How to get lines that contain string in a file?
grep -n "my string" file_name
will do for your particular query. GREP is by default case sensitive in nature and to make it case insensitive you can add -i option to it. The
-n option displays the line numbers. For other myriad options, I recommend
for more interesting pattern matching capability of GREP.