linux: Add grep command explanation (#176)

This commit is contained in:
Omar Hamad 2021-11-11 11:41:51 +02:00 committed by GitHub
parent af7e1a9007
commit 4207cebf49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -638,6 +638,9 @@ They take in input (<) and output for a given file (>) using stdin and stdout.
</summary><br><b> </summary><br><b>
- sed: a stream editor. Can be used for various purposes like replacing a word in a file: `sed -i s/salad/burger/g` - sed: a stream editor. Can be used for various purposes like replacing a word in a file: `sed -i s/salad/burger/g`
- grep: a search tool. Used to search, count or match a text in a file:
- searching for any line that contains a word in a file: `grep 'word' file.md`
- or displaying the total number of times a string appears in a file: `grep -c 'This is a string' file.md`
</b></details> </b></details>
<details> <details>