Building cross reference -- how?

Walter Dnes waltdnes-SLHPyeZ9y/tg9hUCZPvPmw at public.gmane.org
Sun Oct 13 23:43:20 UTC 2013


On Sun, Oct 13, 2013 at 12:30:19PM -0400, William Park wrote
> On Sun, Oct 13, 2013 at 04:22:44AM -0400, Walter Dnes wrote:
> > On Sun, Oct 13, 2013 at 02:14:04AM -0400, William Park wrote
> > >     fgrep -e red
> > >     fgrep -e red | fgrep -e one
> 
> > grep -Hno -f <output_file_from_Pass_1> list_of_input_files
> 
> Is there "AND" operator in grep and its friend?
>     grep -e pat1 -e pat2
> is "OR".  I need "AND".

  You probably want something like...

grep -e ((pat1.*pat2) \| (pat2.*pat1))

  You'll probably have to fix up the escaping there.  It gets ugly once
you get past 2 patterns.

-- 
Walter Dnes <waltdnes-SLHPyeZ9y/tg9hUCZPvPmw at public.gmane.org>
I don't run "desktop environments"; I run useful applications
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list