Hacker News new | past | comments | ask | show | jobs | submit login

No, is not :-). With that approach the "-e" gets eaten, producing:

    rsync -av --no-perms --links "ssh -i id_rsa" . backup@redstar.local:
But, you can re-insert it in the if with:

    $(if [[ "${VALID_SSH}" == "yes" ]]; then echo -e "\055e ${REMOTE_SHELL}"; fi) \
and removing the "-e" from the REMOTE_SHELL var. Then... Same error as before!



Clever. Stopping to think about this, I think setting

    REMOTE_SHELL=""
when it doesn't want to get used, and then inserting it every time, instead of using the conditional

    rsync ... ${REMOTE_SHELL} ...
should also work. If it's empty, then it won't add anything, but if there's something then it'll get passed in.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: