GREP (Global Regular Expression and Print) is a utility used to search for lines containing the string in a file.
Syntax of GREP is : grep [option] [pattern] [ files]
1. Search for lines in a file that contains a word .
> grep "word" <filename>
2. How to search for more than one matching string in a file?
>egrep "a|b|c" <filename>
Comments
Post a Comment