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 -echo expect \"Create a revocation certificate for this key? (y/N) \" send \"y\n\" expect \"Your decision? \" send \"0\n\" expect \"\> \" send \"\n\" expect \"Is this okay? (y/N) \" send \"y\n\" expect \"Enter passphrase: \" send \"$PASS\r\" expect exp_continue ") echo "$VAR" ----------------------------------------- hth someone else. _______________________________________________ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash