1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 05:38:11 +00:00

grep: Add ability to output line numbers

This commit is contained in:
Ben Wiederhake 2021-11-05 00:35:31 +01:00 committed by Brian Gianforcaro
parent b9a270e5e7
commit 1d777073fd
2 changed files with 13 additions and 5 deletions

View file

@ -5,7 +5,7 @@ grep
## Synopsis
```sh
$ grep [--recursive] [--extended-regexp] [--regexp Pattern] [-i] [--invert-match] [--quiet] [--no-messages] [--binary-mode ] [--text] [-I] [--color WHEN] [file...]
$ grep [--recursive] [--extended-regexp] [--regexp Pattern] [-i] [--line-numbers] [--invert-match] [--quiet] [--no-messages] [--binary-mode ] [--text] [-I] [--color WHEN] [file...]
```
## Options:
@ -16,6 +16,7 @@ $ grep [--recursive] [--extended-regexp] [--regexp Pattern] [-i] [--invert-match
* `-E`, `--extended-regexp`: Extended regular expressions
* `-e Pattern`, `--regexp Pattern`: Pattern
* `-i`: Make matches case-insensitive
* `-n`, `--line-numbers`: Output line-numbers
* `-v`, `--invert-match`: Select non-matching lines
* `-q`, `--quiet`: Do not write anything to standard output
* `-s`, `--no-messages`: Suppress error messages for nonexistent or unreadable files