Print lines with string1 OR string2t
Code:
egrep "string1|string2"
Code:
grep -e "string1" -e "string2"
Code:
grep "string1
string2"
Like this the grep reads from stdin.
If one more argument follows it is a filename where grep reads from.
If more than one arguments follow they are filenames where grep reads from, and a matching line is printed with the filename prefixed (separated with a colon).