8 ms·
How grep got its name
- spicyj 16y agoWow, I was thinking about this just this morning. I assumed it stood for "GNU regular expression parser" or something like that, even though that doesn't really make sense.
- presidentender 16y agoBut GNU is not Unix.
- graywh 16y agoBut grep (written for Unix) is older than GNU.
- MaysonL 16y agoGNU's rep existed previously
- jff 16y agoDon't fall victim to RMS's propaganda--as another poster pointed out, grep, ed, sed, awk, etc. all predate GNU's braindamaged implementations.
- deleted 16y ago[deleted]
- ithkuil 16y agoagreed on the RMS propaganda stuff. But I'm sincerely interested to know why you say that their implementations are braindamaged.
- nuxi 16y agoFrom Early history of UNIX: "When asked what that funny name meant, Ken said it was obvious. It stood for the editor command that it simulated, g/re/p (global regular expression print)." http://massis.lcs.mit.edu/archives/history/early.history.of.unix http://massis.lcs.mit.edu/archives/history/early.history.of....
- judofyr 16y agoWait, what? As a non-native speaker of English, I've always assumed that "grep" is a normal English verb.
- pg 16y agoThat's very funny. It's actually starting to be now.
- mhd 16y agoIn certain circles. Probably the same that would also recognize "grok".
- judofyr 16y agoYou're telling me that "grok" isn't a normal English verb either? What a sad day :-(
- ars 16y agoIt was coined in the book Stranger in a Strange Land by Robert A. Heinlein.
- ColinDabritz 16y agohttps://secure.wikimedia.org/wikipedia/en/wiki/Grok https://secure.wikimedia.org/wikipedia/en/wiki/Grok Grok is a term from Robert A. Heinlein's book "Stranger in a strange land." I can see why finding out that these amazing words are not 'official' English could make you sad, but for me I find it amazing and encouraging, as this is exactly the way that some language is formed! They are so full of future potential. I look forward to seeing what terms 'make it' into major dictionaries in the future.
- sesqu 16y agohttp://ars.userfriendly.org/cartoons/?id=20100124 http://ars.userfriendly.org/cartoons/?id=20100124
- duck 16y agoMore about ed - http://en.wikipedia.org/wiki/Ed_(text_editor) http://en.wikipedia.org/wiki/Ed_(text_editor) It was one of the first end-user programs hosted on the system and has been standard in Unix-based systems ever since. ed was originally written by Ken Thompson and contains one of the first implementations of regular expressions. ... Famous for its terseness, ed gives almost no visual feedback. For example, the message that ed will produce in case of error, or when it wants to make sure the user wishes to quit without saving, is "?". It does not report the current filename or line number, or even display the results of a change to the text, unless requested.
- cag_ii 16y agoEven more about Ed: http://www.gnu.org/fun/jokes/ed.msg.html http://www.gnu.org/fun/jokes/ed.msg.html
- rudin 16y agoI think everyone should spend an evening trying to write in ed. Knowing that most of unix was written in this simple editor shows the power of tight constraints in design decisions and the creativity that can come from them. It also makes the whole cascade of editors ed/vi/vim/... more understandable.
- wazoox 16y agoHowever ed is actually easier to use on a true teletype, where everything you print is actually... printed.
- coliveira 16y agoI did this exercise, and to tell the truth, it works better than "normal" editors for some tasks. For example, fixing bugs from a C compilation, checking a particular line, finding some structure on file based on regular expressions. Nowadays, I use ed regularly whenever possible. I even wrote a blog post on my experiments: http://coliveira.net/software/using-ed-the-standard-unix-editor/ http://coliveira.net/software/using-ed-the-standard-unix-edi...
- bluesmoon 16y ago
- strlen 16y agoThere goes my theory about grep, awk, sed being named after digestive noises. What's interesting is the history of dd and its completely non-UNIX like argument format e.g., if=/dev/null of=./foo bs=4k: the latter was designed as a prank mocking IBM's mainframe OSes (today's equivalent would be making a FactoryFactory in Python, I'd imagine)
- epochwolf 16y agogrep = Global Regular Expression Print awk = Administrator's Wisdom Kit sed = Stream EDitor.
- SwellJoe 16y ago66% correct: awk = Aho, Weinberger, Kernighan
- Groxx 16y agoA much more amusing theory than reality. "perl" could fit in that category too...
- caf 16y agoSadly, having had to wrestle with a surly TSM installation, I can report that IBM tools still use this argument style.
- aristus 16y agoExtra credit: how did glob get its name? I've never found an explicit answer, but the Unix 71 manual suggests that it's short for "global". http://cm.bell-labs.com/cm/cs/who/dmr/man71.pdf http://cm.bell-labs.com/cm/cs/who/dmr/man71.pdf
- mahmud 16y agoOT: but those ThoughtBot people know how to make beautiful websites.
- bluesmoon 16y agostrange, I'd always thought that everyone already knew this. It's mentioned in "Mastering Regular Expressions" and also in "Sed and Awk".
- code_duck 16y agoThat's interesting. I recall ed from the Amiga...
- ralph 16y ago"ed was a command-line editor that worked identically to the colon-commands in vi and vim—in fact, you can press Q to get into ed mode (then type vi to get back into vim)." This is wrong. Pressing Q in vi quits visual mode and returns you to ex(1). ex(1) precedes vi(1) and was an extended editor, based on ed(1). That's why the commands are similar, but not identical. And ed(1) isn't dead, it still is a command-line editor. :-)