#!/bin/sh # rsync.sh # Quick script to rsync web files to their webserver with the specified port. # If we have no arguments, or the second argument is not a positive integer (drop failure output). if [ $# -eq 0 ] || ! [ $2 -gt 0 ] 2>/dev/null; then echo "usage: rsync.sh " else rsync -rtvzP -e "ssh -p $2" ./ $1:/var/tmp/www fi