linux: Add cut command explanation (#177)

This commit is contained in:
Omar Hamad 2021-11-12 14:04:38 +02:00 committed by GitHub
parent 4207cebf49
commit 5b589faffb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -641,6 +641,9 @@ They take in input (<) and output for a given file (>) using stdin and stdout.
- grep: a search tool. Used to search, count or match a text in a file: - 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` - 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` - or displaying the total number of times a string appears in a file: `grep -c 'This is a string' file.md`
- cut: a tool for cutting out selected portions of each line of a file:
- syntax: `cut OPTION [FILE]`
- cutting first two bytes from a word in a file: `cut -b 1-2 file.md`, output: `wo`
</b></details> </b></details>
<details> <details>