]> git.netwichtig.de Git - user/henk/code/shell/rif.git/commitdiff
Use just awk instead of grep + awk + sed combo
authorPaul Fertser <fercerpav@gmail.com>
Mon, 9 Sep 2019 17:46:02 +0000 (02:46 +0900)
committerNico Schottelius <nico@nico-notebook.schottelius.org>
Mon, 9 Sep 2019 17:50:55 +0000 (02:50 +0900)
rif-listfriends.sh

index f228be5a0d2a84bc7073b61efebede39c62ba9ef..4a7e31fafdb9f171ae34424e552a8aa1f91f108d 100755 (executable)
@@ -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) }'