Re: can't pass a response from bash script to an app's interactive dialog

2007-01-25 Thread snowcrash+bugbash
i wasn't even close! but, this works: - #!/usr/local/bin/bash $GPG="sudo -u gpguser /usr/local/bin/gpg $NAME="revoke.txt" $ADDR="[EMAIL PROTECTED]" VAR=$(expect -c " spawn $GPG --output $NAME --gen-revoke $ADDR set timeout -1 stty -

Re: can't pass a response from bash script to an app's interactive dialog

2007-01-25 Thread Paul Jarc
snowcrash+bugbash <[EMAIL PROTECTED]> wrote: > 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'" You have backticks around $CMD. That means bash will run t

can't pass a response from bash script to an app's interactive dialog

2007-01-25 Thread snowcrash+bugbash
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