shell script to find a string in file code example Example: find string in files linux grep -rnw '/path/to/somewhere/' -e 'pattern'