Expect Script ile SFTP

Unix veya Linux sistemlerde Expect Script ile SFTP programını parametrik çağırma burhansftp.exp # !/usr/local/bin/expect -fset login [lrange $argv 0 0]set passw [lrange $argv 1 1]set localfile [lrange $argv 2 2]set remotefile [lrange $argv 3 3]set timeout -1spawn sftp $loginexpect “assword:”send “$passw\r”expect “sftp>”send “lcd /usr/sap/Bankagonderilecek/ \r”expect “sftp> “send “put $localfile $remotefile \r”expect “sftp> “send “bye \r” […]

Devamı