home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.unix.questions:13719 comp.unix.misc:4279
- Newsgroups: comp.unix.questions,comp.unix.misc
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!darwin.sura.net!cs.ucf.edu!crigler
- From: crigler@cs.ucf.edu (James Crigler)
- Subject: Re: UNIX TRIVIA QUESTIONS!!
- Message-ID: <crigler.722320993@eola.cs.ucf.edu>
- Sender: news@cs.ucf.edu (News system)
- Organization: University of Central Florida
- References: <1992Nov20.144705.44987@kuhub.cc.ukans.edu>
- Date: Sat, 21 Nov 1992 04:43:13 GMT
- Lines: 34
-
- yvonne@kuhub.cc.ukans.edu writes:
-
-
- >The following questions have come up in an operating systems
- >class I am taking. As yet, we haven't discovered the answers.
- >Any help that you can offer would be appreciated!!
-
- >UNIX TRIVIA(L) QUESTIONS
-
- >1. What is the origin of the command "grep"? The command verb doesn't
- > seem to bear any resemblance to its purpose.
-
- [Stuff I can't answer deleted.]
-
- In the editor "ed", if you want to display all lines that contain a particular
- "regular expression" (re), you would enter this command:
-
- g/regular expression/p
-
- where
- "g" means "global",
- "/regular expression/" is the thing you want to see the occurrences of
- "p" means "print".
-
- Now mentally abbreviate "/regular expression/" as "re" and voila!, grep.
-
- I do know that it happened, but I can imagine the original grep as a shell
- script that created an ed editing script, then invoked it. (It might
- be pretty easy.)
-
- Jim Crigler
- crigler@eola.cs.ucf.edu
- ----------------------------
- Guinan is Q's mother.
-