Add an example for grep with color output (#8087)

htop
Abreto Fu 2022-05-14 02:26:00 +08:00 committed by GitHub
parent 791abd7b78
commit 69434ed5e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -23,9 +23,9 @@
`grep --{{context|before-context|after-context}}={{3}} "{{search_pattern}}" {{path/to/file}}`
- Print file name and line number for each match:
- Print file name and line number for each match with color output:
`grep --with-filename --line-number "{{search_pattern}}" {{path/to/file}}`
`grep --with-filename --line-number --color=always "{{search_pattern}}" {{path/to/file}}`
- Search for lines matching a pattern, printing only the matched text: