Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Script
- PORT=1111
- USER=user
- remote_ssh="ssh -l $USER -p $PORT"
- # Do not put a command in a variable. (Certainly not a local one anyway.)
- rsync -avH -e "$remote_ssh" user@server:/foo/bar /foo/bar
- # If for some reason you must contain the command, use a function:
- rsyncme() {
- rsync -avH -e "$1" user@server:/foo/bar /foo/bar
- }
- rsyncme "$remote_ssh"
Add Comment
Please, Sign In to add comment