Best way to get fingerprint programatically

Andrew Gallagher andrewg at
Wed Dec 18 10:56:31 CET 2019

On 18/12/2019 09:32, Werner Koch via Gnupg-users wrote:
> The  -F:::::: is an interesting hack but Andrew's or my variant works
> with all AWK implementations:
>    awk -F: '$1=="fpr" {print $10}' | head -1

Aha, I forgot about handling multiple results. Note that you don't need
head if you're already using awk:

	awk -F: '$1=="fpr" {print $10; exit}'


Andrew Gallagher

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <>

More information about the Gnupg-users mailing list