commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
grep - Search file for character string
Search for one or more strings in one or more files. Examples:-
grep that myfile.txt
Look for the string ``that'' in the file called ``myfile.txt'' and print out each line that matches.
egrep -in "this|that" *.dat
Extended grep search *.dat files for ``this'' or ``that'' case insensitive (-i) and where found print line number (-n) along with the line contents.
If you can do better, submit your command here.
You must be signed in to comment.