count=$# if [ $count -eq "0" ] then echo "参数缺失!!!" exit 0 fi file_Name=`basename $1` echo "文件名:$file_Name" dir_Name=`cd -P $(dirname $1); pwd` echo "文件路径:$dir_Name" user=`whoami` for((host=28; host<=29; host++)) do echo "********************* jxkh$host *********************" rsync -rvl $dir_Name/$file_Name $user@jxkh$host:$dir_Name done
注意事项: