mirror of
https://github.com/jbranchaud/til
synced 2026-01-04 23:58:01 +00:00
Add Grep For Multiple Patterns as a unix til
This commit is contained in:
12
unix/grep-for-multiple-patterns.md
Normal file
12
unix/grep-for-multiple-patterns.md
Normal file
@@ -0,0 +1,12 @@
|
||||
# Grep For Multiple Patterns
|
||||
|
||||
You can use the `-e` flag with the `grep` command to search for a pattern.
|
||||
Additionally, you can use multiple `-e` flags to search for multiple
|
||||
patterns. For instance, if you want to search for occurrences of `ruby` and
|
||||
`clojure` in a `README.md` file, use the following command:
|
||||
|
||||
```
|
||||
$ grep -e ruby -e clojure README.md
|
||||
```
|
||||
|
||||
See `man grep` for more details.
|
||||
Reference in New Issue
Block a user