Rsyncing Windows directory to a Linux box: problem with spacesin directory names

Charles Nadeau charlesnadeau at hotmail.com
Wed Dec 17 15:46:56 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,

I dug a bit on Google and found this page:
http://smtp.linux-sxs.org/pipermail/linux-users/2003-October/022433.html
Getting inspiration from this page I added this line to my .bashrc:
IFS=$'\n'

Restarted bash by typing "bash" and ran my script again. I still have the
same error message: 

building file list ... link_stat /diskbox/Anciens : No such file or
directory
link_stat projets/. : No such file or directory
done
IO error encountered - skipping file deletion
./

Thanks in advance for your help.

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