How do i grep for multiple strings #2124
Answered
by
BurntSushi
Venomish-Snake
asked this question in
Q&A
-
Hey all, Ive been struggling to find the answer on how to search for multiple strings or specified list of strings. Lets say i want to grep for any occurances of 'cat' or 'dog'. Thanks guys! |
Beta Was this translation helpful? Give feedback.
Answered by
BurntSushi
Jan 12, 2022
Replies: 2 comments 2 replies
-
I think this should do it: |
Beta Was this translation helpful? Give feedback.
1 reply
-
Yeah there are three ways:
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Venomish-Snake
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yeah there are three ways:
rg 'cat|dog'
,rg -e cat -e dog
and: