Best way to get fingerprint programatically
Andrew Gallagher
andrewg at andrewg.com
Wed Dec 18 10:20:48 CET 2019
On 18/12/2019 07:19, john doe wrote:
> $ gpg --quick-set-expire $(gpg --with-colons -k test | awk -F:::::::::
> 'NR==3{print substr($2,1,length($2)-1)}') 1d
>
> I'm just wondering if there isn't a better, programatically, way to go
> about it?
Your awk looks awkward to me. What about this instead?
awk -F: '/^fpr/ {print $10}'
--
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/4000ccc9/attachment-0001.sig>
More information about the Gnupg-users
mailing list