Hello I am using expect to automate a login task. but the script fails if password starts with a hyphen How can I escape that
I have a lot of trouble properly escaping ' " or other characters Is there a way I can encode all my characters and send expect the encoded string for it to decode before sending
This is my script
#!/usr/bin/expect -f
spawn ssh -o "PubkeyAuthentication no" -l user 10.10.10.10
expect "password: "
send "-cpass\'ok\r"
expect "$ "