Add an example for grep with color output (#8087)
This commit is contained in:
@@ -23,9 +23,9 @@
|
|||||||
|
|
||||||
`grep --{{context|before-context|after-context}}={{3}} "{{search_pattern}}" {{path/to/file}}`
|
`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:
|
- Search for lines matching a pattern, printing only the matched text:
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user