grep Examples - PowerCram Blog

How To Use grep Command In Linux

The grep command searches the given file for lines containing a match to the given strings or words. By default, grep prints the matching lines. grep can be used to search for lines of text that match one or many regular expressions, and outputs only the matching lines. grep Syntax grep ‘word’ filenamegrep ‘string1 string2’ filenamecat otherfile | […]