Created
March 28, 2014 06:42
-
-
Save satokjp/9826697 to your computer and use it in GitHub Desktop.
expect sftp sample script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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