Search The Contents Of A File

Make File With Some Content

echo "There were 24 sales in March." >> sales.txt
echo "We have 90 employees." >> employees.txt

Search The File For Some String

grep March sales.txt
There were 24 sales in March.

Search The File For Some String, Return With Line Numbers

grep -n March sales.txt
1:There were 24 sales in March.
grep -l March sales.txt
sales.txt