3 ms·How can I grep for lines containing foo AND bar, foo OR bar?1 points by kamaraju 9mo agosusam 9mo agoI have always done this with: grep foo | grep bar and grep -E 'foo|bar' I see the article mentions both solutions among several others.