How can I easily get a list of secret key IDs available to the current GnuPG user?
I want a hypothetical command gpg --foo
which I can use for:
keyids=$( ( gpg --foo ) )
for keyid in "${keyids[@]}" ; do …
What is the gpg --foo
command that will just get me the key IDs for my secret keys?
Best Answer
It takes several seconds to complete, but this works:
Thanks to @dirkt and @grawity for pieces of this answer.