grep replacement
Mario Dorion
mdorion at cmtl01.UUCP
Sat Jun 4 14:01:04 AEST 1988
In article <2450011 at hpsal2.HP.COM>, morrell at hpsal2.HP.COM (Michael Morrell) writes:
>
> (...) I'd like to see an option which ONLY prints the line
> numbers where the pattern was found.
>
> Michael Morrell
> hpda!morrell
You could use the following:
grep -n 'foo' bar | cut -d: -f1
--
Mario Dorion | ...!{rutgers,uunet,ihnp4}!
Frisco Bay Industries | philabs!micomvax!cmtl01!mdorion
Montreal, Canada |
1 (514) 738-7300 | I thought this planet was in public domain!
More information about the Comp.unix.questions
mailing list