The history behind "grep"'s name

Hamza Tamenaoul - Jan 7 '19 - - Dev Community

Originally posted in my portfolio.

grep, a tool that is widely used in the Unix world, a tool that no one could live without. It's one of the first command to which every linux beginner is introduced from its start, so its function is no secret to no one. However, what's the history behind its weird name ?

The answer to this question requires us to go back to the early days of Unix, days of resource scarcity, may they be processing power or memory resources. Software developper of the time had to play by the rules and develop very light programs that get the job done. And one of those tools was the ed text editor. But this editor is nothing like the modern editor we have today (VIM looks like JetBrains IDEs next to it). To see a line of text from the text buffer you needed to type p preceeded by the line number. And for searching the buffer for an occurence of a regular expression we could use like in VIM /regularexpression. But for us to search for all the occurences and print them we'll use g/regularexpression/p, written simply g/re/p. And that's how the world grep was born.

The history of Unix is full of these stories. Amazing stories about those early days of computing.

. . . . . . . . . . . . . . .