Rsyncing Windows directory to a Linux box: problem with
spacesin directory names
Wayne Davison
wayned at samba.org
Wed Dec 17 13:40:52 EST 2003
On Tue, Dec 16, 2003 at 08:08:53PM -0600, Max Kipness wrote:
> Based on what was just said above, I am using Bash version 2.05b.0(1),
> and no extra configs for splitting are necessary as it splits
> appropriately at the end of the line.
No, bash splits on all whitespace by default. Take a file like this:
one two three
four five six
seven eight nine
put it in a var:
foo=`cat file`
and then expand it:
echo $foo
This echo command gets 9 separate args. If you use this:
echo "$foo"
This echo command gets just 1 arg (with spaces and newlines included).
However, if you set IFS to contain just a newline, then the unquoted
$foo reference returns 3 args. So, that's one possible bash solution.
..wayne..
More information about the rsync
mailing list