On 12/18/19 10:56 , 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}' > > :-D
This was really interesting. Thanks for that tip (all of you). :) Updated a key the other day, in a more manual way. What about updating sub-keys… $ gpg --with-colons -k 0xlongid | awk -F: '$1=="fpr" {print $10}' 0123… 4567… 8901… 2345… Any convenient way to automate that, or can I just loop it? …something like: $ for k in $(gpg --with-colons -k 0xlongid | awk -F: '$1=="fpr" {print $10}'); do \ > gpg --quick-set-expire ${k} <time>; done · Eric
_______________________________________________ Gnupg-users mailing list Gnupg-users@gnupg.org http://lists.gnupg.org/mailman/listinfo/gnupg-users