From: Alejandro Colomar Date: Sat, 1 Mar 2025 16:52:43 +0000 (+0100) Subject: bin/grepc: Use <() instead of $() X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=24862fb09a9a038730abb5be728b2ebd7a0cc9de;p=thirdparty%2Fman-pages.git bin/grepc: Use <() instead of $() Files are simpler to handle. It results in less flags, and simpler command invocations. And it allows breaking the line more nicely, without having to break in the middle of a quoted region. Signed-off-by: Alejandro Colomar --- diff --git a/bin/grepc b/bin/grepc index b8d3cde3f..6d9c79b78 100755 --- a/bin/grepc +++ b/bin/grepc @@ -237,7 +237,11 @@ else fi \ | xargs pcre2grep "${opts[@]}" -f "$patterns"; fi \ -| perl -pe "$(test "$r" = 'yes' && printf '%s\n' 's/('"$identifier"')/\033[32m\1\033[0m/' || printf '%s\n' 's///')" \ +| perl -p <( + test "$r" = 'yes' \ + && printf '%s\n' 's/('"$identifier"')/\033[32m\1\033[0m/' \ + || printf '%s\n' 's///'; +) \ | if [ -n "$l" ]; then sort \ | uniq;