We are having a password which is bt67nJuse3?{]=_0!\`fr,./&##@
(Except the quotes). This password contains characters such as {
, `
, /
, .
, !
which might need to be escaped. A lot of combinations have been tried to no avail and after spending a lot of time trying to fix this issue, the following snippet is not working.
Already tried:
'bt67nJuse3?{]=_0!`fr,./&##@'"\r"
"bt67nJuse3?{]=_0!`fr,./&##@\r"
"bt67nJuse3?{]=_0"'!'"`fr,./&##@\r"
'bt67nJuse3?{]=_0!`fr,./&##@\r'
"bt67nJuse3?{]=_0!\`fr,./&##@\r"
"bt67nJuse3?{]=_0!\`fr,./&##@\r"
Start of Code:
#!/bin/bash
/usr/bin/expect << EOF
spawn scp user111@servername.domain.com:/home/path1/test1.log /home/path2/
expect {
" password: " { send 'bt67nJuse3?{]=_0!`fr,./&##@'"\r"; exp_continue }
eof
}
... some code ...
EOF
How can I get this password into expect
?