View Full Version : Term of the day: grep

09-13-2002, 01:49 AM
Short for global-regular-expression-print, a UNIX utility that allows the user to search one or more files for a specific string of text and outputs all the lines that contain the string. The user also has the option to replace the string with another.
For example, on a UNIX command line, the user can enter

grep webpage index.htm

commanding the system to search for the character string webpage in the index.htm file. The result will display any and all lines in the file that contain that specific string of characters.

Grep originated from a UNIX text editor, which provided the command sequence g/re/p.