From: Alejandro Colomar Date: Fri, 3 Nov 2023 17:26:00 +0000 (+0100) Subject: bin/grepc: Simplify (remove grepc_search()) X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ecb2102e838c55cf0303ee14c4228b9dacc126a0;p=thirdparty%2Fman-pages.git bin/grepc: Simplify (remove grepc_search()) Signed-off-by: Alejandro Colomar --- diff --git a/bin/grepc b/bin/grepc index 6d70f99bc..40460e123 100755 --- a/bin/grepc +++ b/bin/grepc @@ -234,18 +234,14 @@ grepc_patterns() } -grepc_search() -{ - pcre2grep -${iflag}${lflag}HMn --label="$file" -f <(grepc_patterns "$identifier") \ - | sed -E -f <(test "$kflag" = 'no' && echo 's/^[^: ]+:[0-9]+:/\n\n&\n/') \ - | perl -pe "$(test "$cflag" = 'yes' && echo 's/('"$identifier"')/\033[32m\1\033[0m/' || echo 's///')"; -} - - main() { grepc_parse_cmd "$@"