whiletruedo sleep 1#rsync --progress -avPz -r -e "ssh -p60001" tbt.colo101.$(date +"%Y%m")*.tar.bz2 ops@58.33.72.179:/data/Xtp/FromZZ.SHexitCode=$?## -------------------------------------------------------------------------case$exitCode in
10|23|30| 35)echo"$(date): rsync finished with a network related error: $exitCode";; 0)echo"$(date): rsync finished without error"break# leave the while loop;; *)# all other casesecho"$(date): rsync finished with an unexpected error: $exitCode"## break # we don't know whether repeating it makes sense;;esac## -------------------------------------------------------------------------done