On Mon 26/07/10 9:01 AM , m...@proseconsulting.co.uk sent: > Perfect, that'll do me just fine! I've scripted this suggestion: > > #!/bin/ksh > # > # Set trust level for a given GPG key > # > AWK=/bin/gawk > [ -x /bin/nawk ] && AWK=/bin/nawk > > [ $# -ne 2 ] && echo "Syntax: $0 key trust-level" && exit 1 > > gpg --fingerprint --list-keys "$1" |\ > $AWK -v tmpfile="$TMPFILE" -v trustlevel="$2" ' > /fingerprint/ { for (i=4; i > END { > FS=":" > cmd="gpg --export-ownertrust" > while (cmd | getline) if ($1!=fpr) print > close(cmd) > print fpr ":" trustlevel ":" > } > ' | gpg --import-ownertrust
Sorry, -v tmpfile="$TMPFILE" was a throw-back to an earlier test, you don't need to pass that variable to AWK, i.e. <snip> gpg --fingerprint --list-keys "$1" |\ $AWK -v trustlevel="$2" ' </snip> And sorry about the formatting. My mail client stripped all the indentation. _______________________________________________ Gnupg-users mailing list Gnupg-users@gnupg.org http://lists.gnupg.org/mailman/listinfo/gnupg-users