13

Expect Script Not working with Crontab

view full story
linux-howto

http://www.unix.com – I have the following expect script sitting on a Linux box. === Code: #!/usr/bin/expect -f # # backup.expect # # Expect script to backup a  firewall via a SSH  session # # set firewall    [ lrange $argv 0 0 ] set username    [ lrange $argv 1 1 ] set password    [ lrange $argv 2 2 ] set prompt      [ lrange $argv 3 3 ] set filename    [ lrange $argv 3 3 ] match_max 50000 spawn ssh -l $username $firewall expect "yes/no" { send "yes\r" } expect "assword:" send "$password\r" expect -timeo (HowTos)