I wish to do something like:echo -e trust\n5 | gpg --edit-key DorIn order to supply GPG with answers that were made in advance.But it doesn't work. Any idea?
Feed GPG with answers
bash;gpg
echo -e trust\n5 | gpg --edit-key Dor doesn't work because gpg does not read the answers from stdin, but opens /dev/tty directly for reading.This can be worked around with expect, a tool for automating interactive applications.