Rsyncing Windows directory to a Linux box: problem with
spacesin directory names
Charles Nadeau
charlesnadeau at hotmail.com
Wed Dec 17 15:33:36 EST 2003
Wayne Davison wrote:
> 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
Wayne,
How should I change this? By putting this line in my .bashrc:
$IFS=<tab><newline>
Thanks!
Charles
> $foo reference returns 3 args. So, that's one possible bash solution.
>
> ..wayne..
--
Charles-E. Nadeau Ph.D
http://radio.weblogs.com/0111823/
More information about the rsync
mailing list