To search a file for lines which match a given regular expression.
The grep function in Perl is the command-line function which can be used to search in a data set for lines which match a regular expression. The grep function is essentially a tool that can be used to search for particular information within the data.
The man command of the Linux operating system is the system's documentation pager. Each page argument given to man is normally the name of a program, utility or function. For example, to see the reference manual of the grep program: man grep
'grep' searches a file for lines which match a given regular expression.
grep '\<h.*o\>'
The grep command is used to search for text, or lines containing certain words or strings of words. Stackoverflow, techonthenet, linux are a few sites that tell more about this command
Use the 'grep' command
You would use a pipe. For example. ls | grep cool The output of ls(the list of files in your current directory) is given to grep. Grep then finds and prints file names that include the word cool in them.
PS -eaf|grep defunct
Use the 'grep' command.
grep
grep -ci a
To search a file for lines which match a given regular expression.