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 -
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