On 12/18/2019 10:56 AM, Andrew Gallagher wrote:
> 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}'
>

Thanks to both of you, I'll go with the awk version, that way, I can
avoid unneeded pipe redirection! :)


By any chance, could something like the following be implemented?:

$ gpg -K --print-fingerprint-only test


Which would only print the fingerprint to avoid the awk redirection
altogether.

--
John Doe

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

Reply via email to