Parser for GPG search-key output
Record the output of the batch gpg --search-keys commands into variables. For example, get the public key ids or those with *.amazon.com email addresses:
pubkeyids=$(gpg --batch --keyserver hkp://keyserver.ubuntu.com --search-keys amazon.com 2>&1 | grep -Po '\d+\sbit\s\S+\skey\s+' | cut -d' ' -...
Submitted by mavaddat - 3 years ago