i'm attempting to write a bash script to automate a sublaunched apps' interactive dialog.
fwiw, the app in question is gpg, in its key-revocation mode. the 1st, simple task is to auto-respond to its 1st interactive question with a 'Yes'; subsequent questions -- there are several -- will require different answers. my bash script, % vi test.sh ------------------------------------ #!/usr/local/bin/bash GPG="sudo -u me /usr/local/bin/gpg" ME="[EMAIL PROTECTED]" CMD="$GPG --output revoke.txt --gen-revoke $ME" /usr/bin/expect -c "\ spawn `$CMD`;\ stty -echo;\ expect 'Create a revocation certificate for this key? (y/N) ';\ send 'y\n'" ------------------------------------ @, % ./test.sh correctly launch GPG, and invokes its key revocation session, ----------------------------- sec 1024D/XXXXXXXX 2004-07-07 Me (Me) <[EMAIL PROTECTED]> Create a revocation certificate for this key? (y/N) ----------------------------- but it just _sits_ there. no response is passed/accepted. :-/ i've tried playing with piping 'cat ... |' and 'echo ... |', as well as 'yes y | ...', all with no luck. how do i get that 'yes' response passed to gpg? thanks. _______________________________________________ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash