From: Paul Fertser Date: Mon, 9 Sep 2019 17:46:02 +0000 (+0900) Subject: Use just awk instead of grep + awk + sed combo X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=f6c60dc428413bb52311c69d6b39d36f3e2d049b;hp=c2b79a219926baf4431057c3edcf9fb6c2b62d91;p=user%2Fhenk%2Fcode%2Fshell%2Frif.git Use just awk instead of grep + awk + sed combo --- diff --git a/rif-listfriends.sh b/rif-listfriends.sh index f228be5..4a7e31f 100755 --- a/rif-listfriends.sh +++ b/rif-listfriends.sh @@ -1,4 +1,4 @@ #!/bin/sh # 2019-09-10, Nico Schottelius, Seoul -gpg --list-keys --with-colons | grep RIF | awk -F: '{ print $10 }' | sed 's/\\x3a/:/' +gpg --list-keys --with-colons | awk -F: '/RIF/ { print gensub("\\\\x3a", ":", "g", $10) }'