It is amazing to learn trivias from the beginning of computers. grep is such an ubuquitous tool, and when one of my colleagues asked me “why is it called this way?”, I had to look it up. Turns out, it comes from the tool ed that has a mode g that matches a regular expression re to an action, here p for printing.
| g | global |
| re | regular expression |
| p |
See more detailed story from the teletype era at https://thenewstack.io/brian-kernighan-remembers-the-origins-of-grep/