Skip to content

Commit 4207ceb

Browse files
author
Omar Hamad
authored
linux: Add grep command explanation (iluwatar#176)
1 parent af7e1a9 commit 4207ceb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -638,6 +638,9 @@ They take in input (<) and output for a given file (>) using stdin and stdout.
638638
</summary><br><b>
639639

640640
- sed: a stream editor. Can be used for various purposes like replacing a word in a file: `sed -i s/salad/burger/g`
641+
- grep: a search tool. Used to search, count or match a text in a file:
642+
- searching for any line that contains a word in a file: `grep 'word' file.md`
643+
- or displaying the total number of times a string appears in a file: `grep -c 'This is a string' file.md`
641644
</b></details>
642645

643646
<details>

0 commit comments

Comments
 (0)