rsync and expect
Using expect to rsync the directory /Users/silvi003/Documents/workspace/dspace-sr
to
silvi003@odin.lib.umn.edu:/home/silvi003/src
over ssh using the password $ThePassWord
#!/usr/bin/expect
spawn rsync -a --delete -e ssh /Users/silvi003/Documents/workspace/dspace-sr silvi003@odin.lib.umn.edu:/home/silvi003/src
expect "password:"
send "$ThePassWord\r"
expect eof
to
silvi003@odin.lib.umn.edu:/home/silvi003/src
over ssh using the password $ThePassWord