On Wed, Jul 27, 2016 at 3:46 PM, John Buehrer <j...@zuri.ch> wrote:

>
>     $ printf "5\n" | gpg2 --batch --edit-key 67A92459607354C7 trust quit
>

I think that it should work with the option `--command-fd=0`, which tells
gpg2
to get the commands from stdin. See this example:
https://github.com/dashohoxha/egpg/blob/gnupg-2.1/src/cmd/contact/trust.sh#L39


> I'm surprised anything GNU doesn't automatically read input from a
> redirected STDIN,
> that's Unix 101.
>

I totally agree with you on this. This was my reaction too, and beleive it
is the same
for every unix guy that comes across gnupg.

Searching the archives, I see a number of complicated scripting
> work-arounds.
> Maybe I missed the insight somewhere why this simply doesn't "just work" ?
>

If I am allowed to speculate, this happens because gnupg is a very ancient
program,
since the time of dinosaurs. However it is trying to become more modern
lately.
Another reason may be that it has tried to immitate closely OpenPGP.
_______________________________________________
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users

Reply via email to