Skip to Main Content

Infrastructure Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

use of expect in shell script

Data BoyNov 19 2009 — edited Nov 19 2009
hi 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"
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 17 2009
Added on Nov 19 2009
2 comments
2,802 views