From owner-freebsd-questions Sun Mar 1 13:33:57 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id NAA06451 for freebsd-questions-outgoing; Sun, 1 Mar 1998 13:33:57 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from allegro.lemis.com (allegro.lemis.com [192.109.197.134]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id NAA06440 for ; Sun, 1 Mar 1998 13:33:43 -0800 (PST) (envelope-from grog@lemis.com) Received: from freebie.lemis.com (freebie.lemis.com [192.109.197.137]) by allegro.lemis.com (8.8.7/8.8.5) with ESMTP id IAA07284; Mon, 2 Mar 1998 08:03:24 +1030 (CST) Received: (from grog@localhost) by freebie.lemis.com (8.8.8/8.8.7) id IAA07316; Mon, 2 Mar 1998 08:03:03 +1030 (CST) (envelope-from grog) Message-ID: <19980302080302.64725@freebie.lemis.com> Date: Mon, 2 Mar 1998 08:03:02 +1030 From: Greg Lehey To: Marty Leisner , Johann Visagie Cc: Jake , freebsd-questions@FreeBSD.ORG Subject: Re: what does grep stand for? References: <9803012048.AA15657@gnu.sdsp.mc.xerox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.89i In-Reply-To: <9803012048.AA15657@gnu.sdsp.mc.xerox.com>; from Marty Leisner on Sun, Mar 01, 1998 at 12:48:46PM -0800 WWW-Home-Page: http://www.lemis.com/~grog Organization: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-41-739-7062 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sun, 1 March 1998 at 12:48:46 -0800, Marty Leisner wrote: > > In message , you write: >> Jake wrote: >>> >>> My teacher says grep stands for Get Regular ExPression, >>> I thought it was more complicated. >> >> Global regular expression and print, I always thought. In ed(1): >> >> g/re/p > > Get a new teacher. Why? >> From the jargon file: > > :grep: /grep/ /vi./ [from the qed/ed editor idiom g/re/p, > where re stands for a regular expression, to Globally search > for the Regular Expression and Print the lines containing matches > to it, via {{Unix}} `grep(1)'] To rapidly scan a file or set > of files looking for a particular string or pattern (when browsing > through a large set of files, one may speak of `grepping > around'). By extension, to look for something by pattern. "Grep > the bulletin board for the system backup schedule, would you?" > See also {vgrep}. Where's the contradiction? Originally, in ed(1), to search for, say, lines ending in foo (like the previous one), you'd enter g/foo$/p It was rather inconvenient to start ed for this common function, so they wrote grep instead. Greg To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message