Why does pipeline work this way?

Michael Morrell morrell at hpsal2.HP.COM
Tue Dec 19 10:09:55 AEST 1989


/ hpsal2:comp.unix.questions / cpcahil at virtech.uucp (Conor P. Cahill) /  5:34 am  Dec 16, 1989 /
If you really want this functionality, get the gnu grep sources and add
a parameter to stop looking after the first match (i.e. only show the
first matching record).
----------

You could also use sed (as in "sed '<pattern>p;q'") which will stop reading
the input after the match.

  Michael



More information about the Comp.unix.questions mailing list