[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: can't pass a response from bash script to an app's interactive dialo
From: |
Paul Jarc |
Subject: |
Re: can't pass a response from bash script to an app's interactive dialog |
Date: |
Thu, 25 Jan 2007 18:52:44 -0500 |
User-agent: |
Gnus/5.110003 (No Gnus v0.3) Emacs/21.4 (gnu/linux) |
snowcrash+bugbash <schneecrash+bugbash@gmail.com> 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 the gpg
command first, and the substitute its output in the argument to
expect. If you want expect to see literal backticks around the gpg
command, escape them with backslashes.
paul