grep replacement
Lloyd Zusman
ljz at fxgrp.UUCP
Thu May 26 07:44:32 AEST 1988
In article <5630 at umn-cs.cs.umn.edu> papowell at attila.UUCP (Patrick Powell) writes:
In article <7882 at alice.UUCP> andrew at alice.UUCP writes:
>
> Al Aho and I are designing a replacement for grep, egrep and fgrep.
>The question is what flags should it support and what kind of patterns
>should it handle? ...
...
The other facility is to find multiple line patterns, as in:
find the pair of lines that have pattern1 in the first line
pattern2 in the second, etc.
This I have needed sooo many times; I have ended up using AWK
and a clumsy set of searches.
For example:
\#{1 p}Pattern
\#{2}Pattern
This could print out lines that match, or only the first line
(1p->print this one only).
...
Or another way to get this functionality would be for this new greplike
thing to allow matches on the newline character. For example:
^.*foo\nbar.*$
^^
newline
--
Lloyd Zusman UUCP: ...!ames!fxgrp!ljz
Master Byte Software Internet: ljz%fx.com at ames.arc.nasa.gov
Los Gatos, California or try: fxgrp!ljz at ames.arc.nasa.gov
"We take things well in hand."
More information about the Comp.unix.questions
mailing list