[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: rsync --delete



* Mike McClain <mike.junk.46@att.net> [20-10/16=Fr 17:09 -0500]:
> [...] A section of the backup script is so:
> Params=(-a --inplace --delete);
> [...] 
> echo /usr/bin/rsync $Params --exclude-from=/home/mike/.rsync_exclude . $Flash/mike

Try this to be sure your shell is doing what you think:
debian/pts/14 bash ~ 23:20 0$a=(x y z)
debian/pts/14 bash ~ 23:20 0$echo $a
x
debian/pts/14 bash ~ 23:20 0$echo "$a"
x
debian/pts/14 bash ~ 23:21 0$echo "${a[@]}"
x y z
debian/pts/14 bash ~ 23:21 0$a=x y z # Suggested in another reply
bash: y: command not found
debian/pts/14 bash ~ 23:21 127$echo "$a"
x
debian/pts/14 bash ~ 23:25 0$a="x y z"
debian/pts/14 bash ~ 23:25 0$echo $a
x y z
debian/pts/14 bash ~ 23:26 0$echo "$a" # preferred
x y z
debian/pts/14 bash ~ 23:26 0$# When $a is embedded, quote *outer* string:
debian/pts/14 bash ~ 23:27 0$echo "foo $a bar"
foo x y z bar
debian/pts/14 bash ~ 23:27 0$


Reply to: