Am 12.08.2011 08:41, schrieb 赵小强: > Hi there: > I want to generate a keypair . But i dont want to type "gpg --gen-key" > and then answer questions. > I want to write all the answers in a file and then let gpg read the > answer from the file in batch mode. > What the format of the file should be? Any help? >
You can simply write the answers down like you would in an interactive session with gpg. Then feed this file with `gpg --gen-key ... < file` gpg just reads from standard input. There is no difference between a user pressing return and a newline character in a text file. If you want to generate multiple key from one file, try something like `while gpg --gen-key ...; do true; done < file` Hope this helps, Florian Philipp
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Gnupg-users mailing list Gnupg-users@gnupg.org http://lists.gnupg.org/mailman/listinfo/gnupg-users