Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
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
susam
79 days 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.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: