Steffen Nurpmeso [2019-07-03 17:08:32+02:00] wrote:

> My question: is there any better way than a shell script over
> --list-keys --with-colon | grep ^pub | ...etc... to "minimize" keys in
> my keyring (with gpg1)?

It seems that there is no better way than scripting it. My "--edit-key +
clean" script is below. It can be changed to "minimize".


#!/bin/sh
gpg --batch --with-colons --list-keys | awk -F: '
$1 == "pub" {pub = 1}
pub == 1 && $1 == "fpr" {printf "%s clean save\n", $10; pub = 0}' | \
        xargs -n3 -- gpg --batch --no-auto-check-trustdb --edit-key

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users

Reply via email to