diff options
| author | Alejandro Colomar <alx@kernel.org> | 2024-09-19 14:12:57 +0200 |
|---|---|---|
| committer | Alejandro Colomar <alx@kernel.org> | 2025-10-29 21:29:27 +0100 |
| commit | 0ba68dd035649cd4c3e7c24ed3cd2676ff9908e4 (patch) | |
| tree | 6539c6d462969033de17e1dfef7ad7cd94b04507 | |
| parent | 6f637ebfc3730f9e91e0786afeade17b36ac4bcd (diff) | |
| download | man-pages-0ba68dd035649cd4c3e7c24ed3cd2676ff9908e4.tar.gz | |
bin/grepc, grepc.1: -k: Remove flag
Just behave like grep(1) and pcre2grep(1). If the user wants to see it
more nicely, they can do it themselves.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
| -rwxr-xr-x | bin/grepc | 5 | ||||
| -rw-r--r-- | share/man/man1/grepc.1 | 15 |
2 files changed, 3 insertions, 17 deletions
@@ -8,7 +8,6 @@ C=''; c=''; h='-H'; i=''; -k='no'; l=''; m=''; n=''; @@ -47,7 +46,7 @@ grepc_err() } -while getopts "A:B:C:chiklm:nrt:x:" opt; do +while getopts "A:B:C:chilm:nrt:x:" opt; do case "$opt" in A) A="-A$OPTARG"; ;;& B) B="-B$OPTARG"; ;;& @@ -55,7 +54,6 @@ while getopts "A:B:C:chiklm:nrt:x:" opt; do c) c='-c'; ;;& h) h='-h'; ;;& i) i='-i'; ;;& - k | l) k='yes'; ;;& l) l='-l'; ;;& m) m="-m$OPTARG"; ;;& n) n='-n'; ;;& @@ -239,7 +237,6 @@ else fi \ | xargs pcre2grep "${opts[@]}" -f "$patterns"; fi \ -| sed -E -f <(test "$k" = 'no' && printf '%s\n' 's/^[^: ]+:[0-9]+:/\n\n&\n/') \ | perl -pe "$(test "$r" = 'yes' && printf '%s\n' 's/('"$identifier"')/\033[32m\1\033[0m/' || printf '%s\n' 's///')" \ | if [ -n "$l" ]; then sort \ diff --git a/share/man/man1/grepc.1 b/share/man/man1/grepc.1 index fd2c8e1356..60316ae64c 100644 --- a/share/man/man1/grepc.1 +++ b/share/man/man1/grepc.1 @@ -148,11 +148,6 @@ Suppress the prefixing of file names on output. Ignore case distinctions in .IR pattern . .TP -.B \-k -Compact (kurz) output. -Don't print extra newlines -(the header is printed in the same line as the first line of a match). -.TP .B \-l Suppress normal output; instead print the name of each input file @@ -197,15 +192,9 @@ redirect it to the standard input. .SH EXAMPLES .EX .RB \(ti/src/nginx/unit$ " grepc \-n nxt_sprintf .;" -\& -\& -\&./src/nxt_sprintf.h:15: -NXT_EXPORT u_char *nxt_cdecl nxt_sprintf(u_char *buf, u_char *end, +\&./src/nxt_sprintf.h:15:NXT_EXPORT u_char *nxt_cdecl nxt_sprintf(u_char *buf, u_char *end, const char *fmt, ...); -\& -\& -\&./src/nxt_sprintf.c:58: -u_char * nxt_cdecl +\&./src/nxt_sprintf.c:58:u_char * nxt_cdecl nxt_sprintf(u_char *buf, u_char *end, const char *fmt, ...) { u_char *p; |
