Embedded Blanks

Embedded blanks (spaces) in folder and file names requires special handling.

Shell Script Filename

To execute / run a Shell Script that has a file name with an embedded blank/space, preface the blank/space with a blackslash “\”. So, to run a script name backup-My Documents.sh type:

backup-My\ Documents.sh

RSYNC Command

When the source path name has an embedded blank preface the blank with a blackslash ().

When the target path name has an embedded blank, encapsulate the entire path name in single quotes (‘) and preface the blank with a backslash ().

For example, in a script that runs a rsync command code:

rsync -e ssh -varuzP --exclude-from=filelist.txt
/media/ACERDATA/My\ Documents/
'userid@computername:/media/Backup/ACERDATA/My\ Documents/'