#! /bin/bash [ $# -eq 0 ] && { echo >&2 Missing argument, type "booksync tabletname"; exit 1; } echo starting sync with $1 sudo rsync --verbose --progress --stats --compress --rsh=/usr/bin/ssh \ --recursive --times --perms --links --delete \ --exclude "*bak" --exclude "*~" \ /software/books/* $1:/media/mmc1/books/