Re: [gentoo-user] Searching OpenOffice documents

2004-01-24 Thread Norberto Bensa
[EMAIL PROTECTED] wrote:
> grep textdesired *

E Aren't OOo Documents gzip'ed?

Regards,
Norberto


pgp0.pgp
Description: signature


Re: [gentoo-user] Searching OpenOffice documents

2004-01-23 Thread renna
On Friday 23 January 2004 23:13, Norbert Kamenicky wrote:
> renna wrote:
> > On Friday 23 January 2004 19:44, Norbert Kamenicky wrote:
> >>[EMAIL PROTECTED] wrote:
> >>>grep textdesired *
> >>
> >>Bad joke  :-(.
> >>
> >>
> >>--
> >>[EMAIL PROTECTED] mailing list
> >
> > on my machine it's
> > grep textdesired /*/*
> >
> >
> > --
> > [EMAIL PROTECTED] mailing list
>
> Please try it, to see u are just kidding ! :-(
>
> And do not check it on *.txt file, but
> OpenOffice *.sx* file ! :-)
>
> noro
>
>
>
>
>
> --
> [EMAIL PROTECTED] mailing list

yes i wasn't trying it on openoffice files :)

-- 
Dubitare
Disobbedire
Disertare


Renato Budinich
[EMAIL PROTECTED]
[EMAIL PROTECTED]



--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] Searching OpenOffice documents

2004-01-23 Thread Norbert Kamenicky
renna wrote:
On Friday 23 January 2004 19:44, Norbert Kamenicky wrote:

[EMAIL PROTECTED] wrote:

grep textdesired *
Bad joke  :-(.

--
[EMAIL PROTECTED] mailing list


on my machine it's 
grep textdesired /*/*

--
[EMAIL PROTECTED] mailing list
Please try it, to see u are just kidding ! :-(

And do not check it on *.txt file, but
OpenOffice *.sx* file ! :-)
noro





--
[EMAIL PROTECTED] mailing list


Re: [gentoo-user] Searching OpenOffice documents

2004-01-23 Thread Norbert Kamenicky
Mike Williams wrote:
On Friday 23 January 2004 19:43, Norbert Kamenicky wrote:


Since all the text is in one xml formated line, grep will
print complete text (if matches).
Some workaround is needed before grep ...
these steps are needed:




Or just add -o to grep :)

   -o, --only-matching
  Show only the part of a matching line that matches PATTERN.
yes, in case u like to have your answer hidden in 
and doesn't matter if some false matches occures
(if searching words which are inside the tags ...
there is plenty of them FYI )
noro

--
[EMAIL PROTECTED] mailing list


Re: [gentoo-user] Searching OpenOffice documents

2004-01-23 Thread Norbert Kamenicky
Marshal Newrock wrote:
On Fri, 23 Jan 2004, Norbert Kamenicky wrote:


The OpenOffice file format is zipped xml.  So you should just be able to
use zgrep, although it will miss any phrases that have extra formatting in
them, such as a phrase in which part of it is underlined.  Also, I'm not
sure how that will handle newlines.
Since all the text is in one xml formated line, grep will
print complete text (if matches).
Some workaround is needed before grep ...
these steps are needed:

1. unzip "content.xml" from OOo document
2. convert it to text format
3. grep
try this (not tested)

unzip -p your-OOo-document content.xml \
| sed "s/<[^<>]*>/\n/g" \
| grep string


I'd use 'fold -s' instead of the sed line.
I've never looked at an OOo file, so I didn't know it was all on a single
line.  I suppose that saves a little bit of space, but it's a bit
inconvenient.
If u look inside, u learn your answer is a bad joke :-)
Which space u like to save ?
Those cca 10 Bytes on cmd line ? (And make it unfunctional ? )
noro





--
[EMAIL PROTECTED] mailing list


Re: [gentoo-user] Searching OpenOffice documents

2004-01-23 Thread Mike Williams
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Friday 23 January 2004 19:43, Norbert Kamenicky wrote:

> Since all the text is in one xml formated line, grep will
> print complete text (if matches).
> Some workaround is needed before grep ...
>
> these steps are needed:



Or just add -o to grep :)

   -o, --only-matching
  Show only the part of a matching line that matches PATTERN.


- -- 
Mike Williams
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQFAEXxiInuLMrk7bIwRAlRmAJ0aaGp45LT3GXO/pymct1qKoSGKvACfZi1A
HUg+NCsbKlcDdfZo4fcYSAM=
=itvY
-END PGP SIGNATURE-

--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] Searching OpenOffice documents

2004-01-23 Thread Marshal Newrock
On Fri, 23 Jan 2004, Norbert Kamenicky wrote:

> > The OpenOffice file format is zipped xml.  So you should just be able to
> > use zgrep, although it will miss any phrases that have extra formatting in
> > them, such as a phrase in which part of it is underlined.  Also, I'm not
> > sure how that will handle newlines.
> >
>
> Since all the text is in one xml formated line, grep will
> print complete text (if matches).
> Some workaround is needed before grep ...
>
> these steps are needed:
>
> 1. unzip "content.xml" from OOo document
> 2. convert it to text format
> 3. grep
>
> try this (not tested)
>
> unzip -p your-OOo-document content.xml \
> | sed "s/<[^<>]*>/\n/g" \
> | grep string

I'd use 'fold -s' instead of the sed line.
I've never looked at an OOo file, so I didn't know it was all on a single
line.  I suppose that saves a little bit of space, but it's a bit
inconvenient.

-- 
CAUTION: Product will be hot after heating


--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] Searching OpenOffice documents

2004-01-23 Thread Norbert Kamenicky
Marshal Newrock wrote:
On Fri, 23 Jan 2004, Guy Van Sanden wrote:


Is it possible to search through openoffice documents in a given
directory (or subdirectories) for a text string?
And if so, how can it be done?


The OpenOffice file format is zipped xml.  So you should just be able to
use zgrep, although it will miss any phrases that have extra formatting in
them, such as a phrase in which part of it is underlined.  Also, I'm not
sure how that will handle newlines.
Since all the text is in one xml formated line, grep will
print complete text (if matches).
Some workaround is needed before grep ...
these steps are needed:

1. unzip "content.xml" from OOo document
2. convert it to text format
3. grep
try this (not tested)

unzip -p your-OOo-document content.xml \
| sed "s/<[^<>]*>/\n/g" \
| grep string
noro







--
[EMAIL PROTECTED] mailing list


Re: [gentoo-user] Searching OpenOffice documents

2004-01-23 Thread renna
On Friday 23 January 2004 19:44, Norbert Kamenicky wrote:
> [EMAIL PROTECTED] wrote:
> > grep textdesired *
>
> Bad joke  :-(.
>
>
> --
> [EMAIL PROTECTED] mailing list

on my machine it's 
grep textdesired /*/*


--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] Searching OpenOffice documents

2004-01-23 Thread Norbert Kamenicky
[EMAIL PROTECTED] wrote:
grep textdesired *
Bad joke  :-(.

--
[EMAIL PROTECTED] mailing list


Re: [gentoo-user] Searching OpenOffice documents

2004-01-23 Thread brettholcomb
grep textdesired *
> 
> From: Guy Van Sanden <[EMAIL PROTECTED]>
> Date: 2004/01/23 Fri PM 04:27:09 GMT
> To: [EMAIL PROTECTED]
> Subject: [gentoo-user] Searching OpenOffice documents
> 
> Is it possible to search through openoffice documents in a given
> directory (or subdirectories) for a text string?
> And if so, how can it be done?
> 
> Thanks
> 
> Guy
> -- 
> __  
> 
> Guy Van Sanden 
> http://unixmafia.port5.com  
> 
> Registered Linux user #249404 - September 1997
> __
> 
> 
> --
> [EMAIL PROTECTED] mailing list
> 
> 


--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] Searching OpenOffice documents

2004-01-23 Thread Marshal Newrock
On Fri, 23 Jan 2004, Guy Van Sanden wrote:

> Is it possible to search through openoffice documents in a given
> directory (or subdirectories) for a text string?
> And if so, how can it be done?

The OpenOffice file format is zipped xml.  So you should just be able to
use zgrep, although it will miss any phrases that have extra formatting in
them, such as a phrase in which part of it is underlined.  Also, I'm not
sure how that will handle newlines.

-- 
CAUTION: Product will be hot after heating


--
[EMAIL PROTECTED] mailing list



[gentoo-user] Searching OpenOffice documents

2004-01-23 Thread Guy Van Sanden
Is it possible to search through openoffice documents in a given
directory (or subdirectories) for a text string?
And if so, how can it be done?

Thanks

Guy
-- 
__  

Guy Van Sanden 
http://unixmafia.port5.com  

Registered Linux user #249404 - September 1997
__


--
[EMAIL PROTECTED] mailing list