0
Q:

grep more than one word

# Basic syntax:
grep 'word1\|word2\|word3' /path/to/file
# This prints all lines that match word1, word2, OR, word3
1
Just use one of following forms with grep or egrep commands :)
grep "PATTERN1\|PATTERN2" FILE
grep -E "PATTERN1|PATTERN2" FILE
grep -e PATTERN1 -e PATTERN2 FILE
egrep "PATTERN1|PATTERN2" FILE
0

New to Communities?

Join the community