File: ex.tcl

package info (click to toggle)
udm 1.0.0.352-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 28,076 kB
  • sloc: pascal: 72,496; ansic: 6,892; awk: 880; makefile: 768; sh: 493; perl: 34; python: 22; tcl: 18
file content (18 lines) | stat: -rwxr-xr-x 400 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
set timeout 20
set sftparameters [lindex $argv 0]
set password [lindex $argv 1]
set localdir [lindex $argv 2]
set remotedir [lindex $argv 3]
set imagename [lindex $argv 4]
spawn sftp "$sftparameters"
expect "assword:"
send "$password\r"
expect "sftp>"
send "cd ${remotedir}\r"
expect "sftp>"
send "put ${localdir}sqm.html\r"
expect "sftp>"
send "put ${imagename}\r"
expect "sftp>"
send "quit\r"
exit