DEV Community

Discussion on: The history behind "grep"'s name

Collapse
 
michaeltharrington profile image
Michael Tharrington

Haha, as an absolute beginner, I really appreciate this one. I'm taking the Command Line Crash Course in Learn Python The Hard Way and have a bunch of flash cards with different commands on them, grep included.

Anyway, I think I get the "p" part and "re" ... but, what's the deal with "g"?

Collapse
 
val_baca profile image
Valentin Baca

g matches all lines ("global")

In general, to see all lines matching the regular expression “re”, use g/re/p.

robots.thoughtbot.com/how-grep-got...

Collapse
 
michaeltharrington profile image
Michael Tharrington

Appreciate ya clearing that up for me. :-)