- if $GPG --list-keys | awk '/^pub/{print $2}'|grep -q $key; then
- $GPG --quiet --batch --delete-key --yes "${key#*/}"
+ if $GPG --list-keys --with-colons | awk '/^pub/{FS=":";print $5}'|grep -q $key; then
+ $GPG --quiet --batch --delete-key --yes ${key}