Bash -- Rsync directory variable has a space
So I am writing a bash script to automatically rsync around 40 different directories to 40 other directories on another server.
If you want to read my whole script you can find it here: http://pastebin.com/uph49vHd
However the important bit is as follows:
The problem is that kiskasys is full of directory names with spaces.
Now I can easily change how those directory names are put into the array, say by adding escaped spaces like '\ ' or by adding quotes around it etc but i have tried all different combinations of this and still have yet to make it work.
Here is an example of what the rsync command would look like if i didnt use variables:
Any help on how to make this work would be appreciated!!
Found the error.
the above is correct, i just needed to remove the single quotes in the localsys variable...
Please mark as SOLVED once you have a solution.
|All times are GMT -5. The time now is 03:24 AM.|