LINUX Experience
Monday, June 18, 2012
File upload script using expect
#!/usr/bin/expect
spawn rsync -avzh -e ssh /root/backup-mail root@192.168.1.1:/root/backup/
set pass "123456"
expect {
password: {send "$pass\r"; exp_continue}
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment