So, let’s use the PIPE with the another command like cat. So, we have a file “Security_OS” and we have to search the word “security“. How to Search a word in a file using grep command in Linux and Unix? Command: # grep security Security_OS So, we will look at the examples, patterns and the option for the grep command in Linux. With the help of these command we can search a whole line, exact match, exclude the pattern, search multiple words and many more.
Grep exact match command in Linux and Unix is mainly used to search any kind of pattern in each file.