grep replacement
Tai Jin
jin at hplabsz.HPL.HP.COM
Wed Jun 1 08:44:18 AEST 1988
In article <1039 at ima.ISC.COM> trb at ima.UUCP (Andrew Tannenbaum) writes:
>I have always wanted to be able to tell grep to NOT print the file
>names on a multi-file grep. Let's say I want a phone number script -
>usually a simple grep - but if I want to store the numbers in multiple
>files (e.g. mine and my departments), then the output contains
>unsightly filenames. This has always struck me as opposite to the UNIX
>philosophy of having a filter provide output that is useful as data.
Actually, I think the Unix philosophy is to have simple filters and use
pipes to construct more complex filters. Unfortunately, you can't do
everything with pipes.
>I would like the option to go to the next file after first match
>(regardless of which other options are present). Also, I would like to
>print a region other than line on a match. It would be nice to delimit
>the patterns using regexps, as "-n,+n" and "?^$?,/^$/" (among others)
>would be useful.
I also would like a context grep that greps for records with arbitrary
delimiters. I started working on this, but I've had no time to finish it.
...tai
More information about the Comp.unix.questions
mailing list