How can I grep for lines containing foo AND bar, foo OR bar?

1 pointsposted 16 hours ago
by kamaraju

1 Comments

susam

15 hours ago

I have always done this with:

  grep foo | grep bar
and

  grep -E 'foo|bar'
I see the article mentions both solutions among several others.