To grep multiple patterns from a file
grep -E "patternone|patterntwo" file
The option -E is to enable extended posix regular-expression (|). The quotation marks are to prevent the shell from taking | for pipe.
Thursday, December 11, 2008
Subscribe to:
Posts (Atom)