use of expect in shell script
Data BoyNov 19 2009 — edited Nov 19 2009hi all ,
can anyone explain me this script particularly why expect is used here.
set timeout -1
spawn sftp pot@11.11.1.34
match_max 100000
expect -exact "Connecting to 11.11.1.34...\r
sftp> "
send -- "cd /opt/app/policies/data\r"
expect -exact "cd /opt/app/policies/data\r
sftp> "
send -- "get potcontrol.dat\r"