From: Alejandro Colomar Date: Thu, 19 Sep 2024 12:12:57 +0000 (+0200) Subject: bin/grepc, grepc.1: -k: Remove flag X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0ba68dd035649cd4c3e7c24ed3cd2676ff9908e4;p=thirdparty%2Fman-pages.git 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 --- diff --git a/bin/grepc b/bin/grepc index dd613e0a1..b5aff6951 100755 --- a/bin/grepc +++ b/bin/grepc @@ -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 fd2c8e135..60316ae64 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;