Skip to main content

grep

Case-insensitive grep a file for a word/term

grep -i "some term" somefile.txt

Match whole words in a file

grep -w 'hi' somebigfile.txt

Search for word in file but still display rest of the file and only highlight matches

grep -i "REMOVE\|" log

Source: Twitter