The Unix tool name “grep” is odd. What is the origin of the name “grep”?
Hint 1: It’s named after an old Unix editor command that searched globally for a regex and printed matches.
Hint 2: Think of the command in ed: g/
Solution:
The name “grep” is derived from the Unix `ed` editor command `g/re/p` (global – regular expression – print). In the `ed` editor, typing g/re/p would search for a regex and print matching lines. The standalone tool “grep” was named after this sequence, as it performs the same action outside the editor.

Leave a Reply