Just a small reminder (for myself):
/usr/bin/expect <<EOF
spawn /usr/bin/sftp host.domain
expect "\\n|\\r"
expect "..."
expect "\\n|\\r"
expect "password:"
send PASSWORDXXX\\r
expect "sftp> "
send "ls \\r"
expect "sftp> "
send "bye \\r"
EOF
And read:
man expect
Technorati Tags: script, sftp, shell
Technorati Tags: script, sftp, shell
No comments
Comments feed for this article
Trackback link: http://florian.beyerlein.net/2006/07/18/how-to-shell-script-sftp/trackback/