[Solved] Store rsync error in variable
[ad_1] The line you have put here will just store that command as a string and not run it. rsync_error=”rsync -arzt –ignore-existing –delete –max-delete=1 -e ‘ssh’ [email protected]:$rsync_from_location $rsync_to_location” To capture its output you would need to put it in a $( ) like so. rsync_error=$(rsync -arzt –ignore-existing –delete –max-delete=1 -e ‘ssh’ [email protected]:$rsync_from_location $rsync_to_location) This will … Read more