*BSD News Article 82515


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.ecn.uoknor.edu!news.cis.okstate.edu!nntp.ksu.edu!news.mid.net!mr.net!www.nntp.primenet.com!nntp.primenet.com!usenet.eel.ufl.edu!news.mathworks.com!uunet!in1.uu.net!bonkers!web.nmti.com!peter
From: peter@nmti.com (Peter da Silva)
Newsgroups: comp.unix.misc,comp.unix.bsd.misc,alt.folklore.computers
Subject: Re: On the Naming of UNIX Things
Date: 8 Nov 1996 20:22:52 GMT
Organization: Network/development platform support, NMTI
Lines: 24
Message-ID: <5604qs$1l7@web.nmti.com>
References: <55vhpf$q3o@mail1.wg.waii.com> <328386bc.112278367@news.ov.com>
NNTP-Posting-Host: sonic.nmti.com
Xref: euryale.cc.adfa.oz.au comp.unix.misc:26189 comp.unix.bsd.misc:1438 alt.folklore.computers:124226

In article <328386bc.112278367@news.ov.com>,
Pete Barber <pete.barber@openv.co.uk> wrote:
> grep GetREgularePression

Sorry, it's based on the ed(1) command that performs the same function:

	g	global

If you want to print all lines containing a regular expression (re), you
would type:

	g/re/p

Where "re" is the placeholder for the regular expression. In version 6 unix
there was a second command, gres, based on the ed(1) global substitute command:

	g/re/s//replacement/

But gres was replaced by sed in version 7. Grep was kept around because
it's a comman action and it's much faster than the more powerful Stream
EDitor.

-- 
</peter>