Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
How can I grep for lines containing foo AND bar, foo OR bar? (wooledge.org)
1 point by kamaraju 79 days ago | hide | past | favorite | 1 comment


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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: