Saturday, August 4, 2018

grep

grep is a command-line utility for searching plain-text data sets for lines that match a regular expression. Its name comes from the ed command g/re/p (globally search a regular expression and print).  (source: wikipedia)

Origins of GREP

Commonly used grep was written overnight, but why and how did it get its name? Professor Brian Kernighan explains in this video: Where GREP Came From - Computerphile 10:06
 
Brian Kernighan is the "K" in the K & R classic "C" computer language reference book. For another video with Kernigham about the "C" and "B" computer languages, visit "C" Programming Language: Brian Kernighan - Computerphile 8:26

Linux man page

NAME

       grep - print lines matching a pattern

SYNOPSIS

       grep [OPTIONS] PATTERN [FILE...]

DESCRIPTION

       grep searches for PATTERN in each FILE.  A FILE of “-” stands for
       standard input.  If no FILE is given, recursive searches examine the
       working directory, and nonrecursive searches read standard input.  By
       default, grep prints the matching lines.

No comments:

Post a Comment