Expect Scripting help - escape characters
I'm having an issue with scripting expect and I was hoping someone could help me out. I'm scripting a telnet session connect, and I can't get the "expect" command to work correctly on the prompt, which is "~ $ ".
I think expect is getting confused by the $.
Heres the script:
set timeout 10
spawn telnet $argv
expect "~ $ "
# Send some commands
I've tried expect "~ \$", expect \$ and a few other escape permutations but the script just stops working after the prompt comes up. Thanks for any help!