rsync --lots-of-options $SRC $DEST EXIT=$? if [ $EXIT -eq 0 ] then echo "Yay, we are all good: [$EXIT]" else echo "Oh noes, bad things happened: [$EXIT]" fi
...you end up with spurious error reports giving you high blood pressure.
So the obvious solution is to make the if condition for error code 0 or 24, and only spit out "Oh Noes" if it was something different. It took me a while to get the syntax right:
if [ \( $EXIT -eq 0 -o $EXIT -eq 24 \) ]