Need help with expect script
Hello,
I'm trying to test expect script which i have written. I'm using a ssh session connect. Below is my script:
#!/usr/bin/expect -f
spawn ssh "domain\username"@localhost
expect "?assword:"
send "$PWD\r"
expect "$"
send "date\r"
expect "$"
send "exit\r"
When i execute this script, I'm getting an output like this:
extra characters after close-quote
while executing
"spawn ssh "domain\username"@localhost
expect "?assword:"
send "$PWD\r"
expect "$"
send "date\r"
send "e..."
Can someone help me out...
Thanks
|