grep
The grep
command (global search for regular expression and print out) searches file(s) for a particular pattern of characters, and displays all lines that contain that pattern. It can be used with other commands like ps
making it more useful.
It has the following syntax:
$ grep [options] pattern [files]
e.g. $ grep "search-regex" file-1.txt
Visit the following resources to learn more: