- 3,126 hits
Place for playing with commands…
ODOC: bala@bala:~ Grep command searches the given file for lines containing a match to the given strings or words. By default, grep prints the matching lines. Use grep to search for lines of text that match one or many regular expressions, and outputs only the matching lines.
Ex: $ grep welcome first.txt
Output: Welcome to “ODOC”
It will find the string related to welcome in first.txt and prints the line.