Re: Grep Options

2000-07-04 Thread Charles Galpin
On Sun, 2 Jul 2000, Anthony E. Greene wrote: > SoloCDM wrote: > > > > While using grep, what is the best way to search for two subjects > > within the same line instead of the following? > > > > cat | grep | grep > > > > This is not an "or" search with "-e", but an "and" search. > > grep

Re: Grep Options

2000-07-03 Thread Anthony E. Greene
SoloCDM wrote: > > While using grep, what is the best way to search for two subjects > within the same line instead of the following? > > cat | grep | grep > > This is not an "or" search with "-e", but an "and" search. grep "^Subject:.*subject1.*subject2" filename -- Anthony E. Greene <[E

Re: Grep Options (CONTINUED)

2000-07-03 Thread Charles Galpin
I'm not sure what you are trying to achieve exactly, but this is easily done is a short perl script. You cannot do what you are asking without invoking grep twice. charles On Mon, 3 Jul 2000, SoloCDM wrote: > > The problem I'm up against is contingent on another issue -- > insensitive casing.

Re: Grep Options (CONTINUED)

2000-07-03 Thread Antony Stace
can we use egrep? egrep "subject1|subject2" SoloCDM wrote: > > Mike McNally wrote: > > > > grep 'subject1.*subject2' > > With this lineup, one must know the exact order of the subjects. > Having more than two subjects and lining them correctly will get > tedious, time consuming, and make scri

Re: Grep Options (CONTINUED)

2000-07-03 Thread SoloCDM
Mike McNally wrote: > > grep 'subject1.*subject2' With this lineup, one must know the exact order of the subjects. Having more than two subjects and lining them correctly will get tedious, time consuming, and make script construction more involved. > -Original Message- > From: SoloCDM

Re: Grep Options

2000-07-02 Thread Bret Hughes
SoloCDM wrote: > While using grep, what is the best way to search for two subjects > within the same line instead of the following? > > cat | grep | grep > > This is not an "or" search with "-e", but an "and" search. something like : grep subject1.+subject2 filename I belive this say grep al

Grep Options

2000-07-01 Thread SoloCDM
While using grep, what is the best way to search for two subjects within the same line instead of the following? cat | grep | grep This is not an "or" search with "-e", but an "and" search. Note: Detailed Document(s) and Sample(s) are more than welcome. When you reply to this message,