find text in files linux grep code example
Example 1: find text in folder
grep -rnw '/path/to/somewhere/' -e 'pattern'
Example 2: linux search for line in file
grep -R "keyword" /directory/
Example 3: find text in linux file
grep 'word' filename
grep 'word' file1 file2 file3
grep 'string1 string2' filename
cat otherfile | grep 'something'
command | grep 'something'
command option1 | grep 'data'
grep --color 'data' fileName