*BSD News Article 83674


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!nntp.coast.net!news.sgi.com!su-news-hub1.bbnplanet.com!news.bbnplanet.com!cam-news-hub1.bbnplanet.com!uunet!in3.uu.net!ott.istar!istar.net!tor.istar!east.istar!news
From: bwinton@undergrad.math.uwaterloo.ca (Blake Winton)
Newsgroups: comp.unix.misc,comp.unix.bsd.misc,alt.folklore.computers
Subject: Re: On the Naming of UNIX Things
Date: 26 Nov 1996 22:12:33 GMT
Organization: None, I'm still in university.
Lines: 17
Message-ID: <57fq0h$282@nr1.toronto.istar.net>
References: <55vhpf$q3o@mail1.wg.waii.com> <E0tAts.BAr.0.queen@torfree.net> <gchamber-1311962115400001@tole-cs-14.dial.bright.net>
NNTP-Posting-Host: blake.incontext.ca
X-Newsreader: News Xpress 2.0 Beta #0
Xref: euryale.cc.adfa.oz.au comp.unix.misc:26714 comp.unix.bsd.misc:1603 alt.folklore.computers:125216

In article <gchamber-1311962115400001@tole-cs-14.dial.bright.net>, gchamber@mail.bright.net (Glenn Chambers) wrote:
>> grep:
>>         "Generic Regular Expression Printer"
>grep is from the ed 'g' command, which had the syntax:
>g/<regular expression>/<command>
>If you describe this command as 'g/re/p', you'll immediately see where the
>name of the program came from.

And, amusingly enough, I was using vi one day a few months back, and I 
wanted to see all the lines in the current file which started with 
"Foo"...  I thought "Damn, I'm going to have to shell out, and run grep, 
and...  hey, I wonder if..."  So I typed in ":g/^Foo/p", and it worked!

So it seems that grep has maintained it's origins.  (of course the next 
thing I did was ":g/re/p" :)

Blake.