Building cross reference -- how?

Chris F.A. Johnson chris-E7bvbYbpR6jSUeElwK9/Pw at public.gmane.org
Mon Oct 14 07:14:52 UTC 2013


On Mon, 14 Oct 2013, William Park wrote:

> On Sun, Oct 13, 2013 at 01:03:46PM -0400, D. Hugh Redelmeier wrote:
>> What's wrong with the multiple fgrep solution that you came up with?
>> The answer might help us understand your problem better.
>
> Nothing wrong with grep solution, really.  It's better than awk
> solution,
>    awk '$0 ~ re1 && $0 ~ re2 {print}'
> because awk is doing 2 full passes whereas grep is doing somewhere
> between 1 and 2 passes.

    What makes you think awk would do 2 passes?

    (And {print} is unnecessary.)

> But, I think this road is "dead end".
>

-- 
Chris F.A. Johnson, <http://cfajohnson.com>
--
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