Usage: grep [OPTIONS]... PATTERN [FILE]...
Search for PATTERN in each FILE or stdin.
Options:
-h Suppress the prefixing filename on output -i Ignore case distinctions -n Print line number with output lines -q Be quiet. Returns 0 if result was found, 1 otherwise -v Select non-matching lines |
This version of grep matches full regular expressions.
Example:
$ grep root /etc/passwd root:x:0:0:root:/root:/bin/bash $ grep ^[rR]oo. /etc/passwd root:x:0:0:root:/root:/bin/bash |