Best way to get fingerprint programatically

Andrew Gallagher andrewg at andrewg.com
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}'

:-D

-- 
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: <https://lists.gnupg.org/pipermail/gnupg-users/attachments/20191218/45d356b6/attachment.sig>


More information about the Gnupg-users mailing list