Linux – grep

Linux grep command The Linux grep command stands for “Global Regular Expression Print“. The grep command-line utility is used for searching content from files based on a pattern or regular expression. Synatx: grep “PATTERN” [FILE] Example: Search all users under /etc/passwd have the bash shell. grep “bash” /etc/passwd Grep command can also take the output of another command as input using pipes. For example: cat /etc/passwd | grep “bash” Case Sensitive Search Grep uses -i option to run a case-sensitive search. grep -i “SearchPattern” filename Search Recursively in Directory Tree…

Read More