Extracting valid content; command line use of --edit-key
Timo Schulz
timo at lcsweb.net
Tue Apr 2 01:23:02 CEST 2002
On Mon Apr 01 2002; 17:07, Michael Young wrote:
> I've tried using the "--command-fd" switch to no avail. It does
> eliminate the message, but that's not all. Depending on the other
> switches, it either: exits without saving (with a "Key not changed
> so no update needed" message, or nothing at all); or, hangs waiting
This mode is a little tricky but if you know how to use it, it's
quite easy. First you should better use --status-fd=2 to get the
hints what input GPG needs:
gpg --status-fd=2 --command-fd=0 --edit-key foo
[GNUPG:] GET_LINE keyedit.prompt
uid 2
[GNUPG:] GET_LINE keyedit.prompt
deluid
[GNUPG:] GET_BOOL keyedit.remove.uid.okay
Y
[GNUPG:] GET_LINE keyedit.prompt
save
Alternative you can also store the input into a single file:
-- "cmds" begin
uid 2
deluid
Y
save
-- "cmds" end
and then execute gpg --status-fd=2 --command-fd=0 --edit-key foo < cmds
Timo
More information about the Gnupg-devel
mailing list