Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!pasteur!ucbvax!decwrl!hplabs!hplabsz!jin From: jin@hplabsz.HPL.HP.COM (Tai Jin) Newsgroups: comp.unix.questions Subject: Re: grep replacement Message-ID: <2018@hplabsz.HPL.HP.COM> Date: 31 May 88 22:44:18 GMT References: <7882@alice.UUCP> <2450011@hpsal2.HP.COM> <54818@sun.uucp> <1039@ima.ISC.COM> Reply-To: jin@hplabsz.UUCP (Tai Jin) Organization: Hewlett-Packard Laboratories Lines: 21 In article <1039@ima.ISC.COM> trb@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