grep
is a bash program that searches files for lines containing a match to a given pattern.
Without any special tricks, it's used like this. This will search for the pattern string
inside the file file.txt
. Each line that matches is displayed entirely.
grep 'string' file.txt
This can …
read more