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

1 pointsposted a month ago
by kamaraju

1 Comments

susam

a month 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.