Current Article  

Grep

grep iscommand line utility originally writtenuse withUnix operating system. The name comes fromcommand inUnix text editor ed that takesform g/re/p meaning search globally forregular expressionprint lines where instancesfound. This describesdefault behaviour ofgrep command. Grep takesregular expression oncommand line, reads standard input orlistfiles,outputslines that matchregular expression. Therevarious command line switches available when using grep that modify that default behaviour.

Theremany derivativesgrep,example agrep which standsapproximate grepfacilitate fuzzy string searching, fgrepfixed pattern searchesegrepsearches involving more sophisticated regular expression syntax. All these variationsgrep have been portedmany computer operating systems.

The Perl programming language providespattern matching function named grep, as do other languages.

Grepoften used asverb,synonymsearch, e.g., "I greppedWikipediaan article on Unix searchingfoundhere."


Copyright 2004. All rights reserved.