Skip to content

Instantly share code, notes, and snippets.

@satokjp
Created March 28, 2014 06:42
Show Gist options
  • Save satokjp/9826697 to your computer and use it in GitHub Desktop.
Save satokjp/9826697 to your computer and use it in GitHub Desktop.
expect sftp sample script
#!/usr/bin/expect
# for cygwin64
#
puts "start"
#spawn ping 192.168.1.101
spawn sftp [email protected]
expect "password: "
send "usr-passwd\n"
expect "sftp>"
send "ls -l\n"
expect "sftp>"
send "bye\n"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment