GREP command in Unix


GREP command in UNIX is used to find the whether the search criteria is available in the file and if the search criteria matches then it will print the matching lines.


The below example shows on how to search the keyword when we are not sure of the file name. In the place of file name if we provide * key, then it will search the keyword from all the files under the directory and print the file name it matches along with the matching lines.

Grep -i command:

This command is as like “grep” but the “-i” ignores the case sensitive. That means irrespective of uppercase or lowercase letter it will search and print the matching lines.


Like it? Please Spread the word!