Skip to content

Commit 05845a1

Browse files
committed
Add Grep For Multiple Patterns as a unix til
1 parent ca9440d commit 05845a1

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,7 @@ _305 TILs and counting..._
269269
- [Find Newer Files](unix/find-newer-files.md)
270270
- [Global Substitution On The Previous Command](unix/global-substitution-on-the-previous-command.md)
271271
- [Grep For Files Without A Match](unix/grep-for-files-without-a-match.md)
272+
- [Grep For Multiple Patterns](unix/grep-for-multiple-patterns.md)
272273
- [Hexdump A Compiled File](unix/hexdump-a-compiled-file.md)
273274
- [Kill Everything Running On A Certain Port](unix/kill-everything-running-on-a-certain-port.md)
274275
- [Killing A Frozen SSH Session](unix/killing-a-frozen-ssh-session.md)

unix/grep-for-multiple-patterns.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Grep For Multiple Patterns
2+
3+
You can use the `-e` flag with the `grep` command to search for a pattern.
4+
Additionally, you can use multiple `-e` flags to search for multiple
5+
patterns. For instance, if you want to search for occurrences of `ruby` and
6+
`clojure` in a `README.md` file, use the following command:
7+
8+
```
9+
$ grep -e ruby -e clojure README.md
10+
```
11+
12+
See `man grep` for more details.

0 commit comments

Comments
 (0)