#!/bin/sh if [ $# -ne 2 ];then echo "The parameters must be input:file path and host" read -p "(Example: /data/www/XXX 192.168.XXX):" filepath host ; else filepath=$1 host=$2 fi echo "download the file in /data/wos_tools/temp/ " sudo rsync -rvazu --ignore-errors --timeout=200 --password-file=/usr/local/rsync/rsync.scrt apache@$host::apache$filepath /data/wos_tools/temp/