I have a Script on my Mac Server to sync with another Mac Server.#!/bin/bashDestVolume=/Path/to/destshareSrcVolume=/Path/to/srcshareSSHKey=sshkeySrcUser=userSrcHost=remoteserverUUID=`uuidgen`tmpfile=/tmp/$UUIDif [ ! -d $DestVolume ]; then    echo $DestVolume not available    exit 100fi# Delete all local Files not on Serverrsync --progress -rv --delete --existing --ignore-existing --exclude-from exclude_file -e ssh -p 23456 -i $SSHKey $SrcUser@$SrcHost:$SrcVolume/ $DestVolume/ 2>&1 | tee rsync.logMy Exclude File*._.**.DS_Store**.download*If I run this script itself, I get deleted several files and empty directories, which are on the remote server. So they should not get deleted.The Script has chmod 700 and is running so: ./script.shBut if I paste this script all lines at ones, I get the result I want.Can anybody explain it to me?
rsync in script on mac
bash;rsync;deleted files