Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!news.mel.connect.com.au!esmeralda.access.net.au!news.netspace.net.au!news.mira.net.au!news.vbc.net!vbcnet-west!news13.agis.net!agis!newsgod1.agis.net!agis!news4.agis.net!agis!www.nntp.primenet.com!nntp.primenet.com!news.bbnplanet.com!cpk-news-hub1.bbnplanet.com!newsserver.jvnc.net!newsserver2.jvnc.net!nntpserver.pppl.gov!cnn.Princeton.EDU!franck.Princeton.EDU!tim From: tim@franck.Princeton.EDU.composers (Tim Hollebeek) Newsgroups: comp.unix.misc,comp.unix.bsd.misc,alt.folklore.computers Subject: Re: On the Naming of UNIX Things Date: 12 Nov 1996 14:05:20 GMT Organization: Chemistry Department, Princeton University Lines: 52 Message-ID: <56a070$cqc@cnn.Princeton.EDU> References: <55vhpf$q3o@mail1.wg.waii.com> <328386bc.112278367@news.ov.com> <560d4o$c68@panix2.panix.com> <328631EA.346F@jpmorgan.com> <ralphp-1011961555120001@du-18.gcstation.net> Reply-To: tim@wfn-shop.princeton.edu NNTP-Posting-Host: franck.princeton.edu Xref: euryale.cc.adfa.oz.au comp.unix.misc:26344 comp.unix.bsd.misc:1482 alt.folklore.computers:124505 In article <ralphp-1011961555120001@du-18.gcstation.net>, ralphp@gcstation.net writes: > Howdy! > > In article <328631EA.346F@jpmorgan.com>, Ling Wang > <wang_ling@jpmorgan.com> wrote: > > > Melinda Shore wrote: > > > > > > In article <328386bc.112278367@news.ov.com>, > > > Pete Barber <pete.barber@openv.co.uk> wrote: > > > >grep GetREgularePression > > > > > > Way incorrect. "Get Regular, Eat Prunes." > > > > > > If you aren't sure about something, look it up before posting. > > > > Shouldn't it be "Go Regularly, Eat Prunes"? > > The "Olympus TuneUp" help file lists GREP as "Global Regular > Expression Parser". Bah. Doesn't anyone know 'ex' (the non-visual version of vi) any more? Objective: to print every line an a file that contains the regular expression 're' Solution: type in "g/re/p" Example: --- franck:/var/adm:123> ex SYSLOG "SYSLOG" [Read only] 73 lines, 6043 characters :g/Xsession/p 10 Nov 3 06:19:35 6B:franck Xsession: tim: logout 11 Nov 3 13:48:46 6B:franck Xsession: tim: login 18 Nov 4 01:40:42 6B:franck Xsession: tim: logout 19 Nov 4 12:00:25 6B:franck Xsession: tim: login 24 Nov 4 15:56:21 6B:franck Xsession: tim: logout 36 Nov 6 13:48:29 6B:franck Xsession: tim: login 37 Nov 7 00:19:04 6B:franck Xsession: tim: logout 38 Nov 7 12:58:00 6B:franck Xsession: tim: login 68 Nov 10 17:47:47 6B:franck Xsession: tim: logout 69 Nov 11 13:40:36 6B:franck Xsession: tim: login --- Hence the name. 'g' stands for "global"; the 'p' means "print". So roughly, "global, search for re, and print". --------------------------------------------------------------------------- Tim Hollebeek | Disclaimer :=> Everything above is a true statement, Electron Psychologist | for sufficiently false values of true. Princeton University | email: tim@wfn-shop.princeton.edu ----------------------| http://wfn-shop.princeton.edu/~tim (NEW! IMPROVED!)