Filenames with blanks

Wayne Davison wayned at users.sourceforge.net
Sat Aug 24 19:29:00 EST 2002


On Sat, 24 Aug 2002, jw schultz wrote:
> 	rsync  -rxlupogtSvv -e ssh \
> 		--rsync-path=/usr/local/sbin/rsync_changed \
> 		$src_host:"$src_dir -mtime +4" $targ_dir

Very creative.  That gives me an idea on how to force an extra parse of
all the args, which would allow all those added quotes to be evaluated:

Create a simple shell command that just does an eval of the total
command line, like this (named "do_rsync"):

#!/bin/sh
eval rsync $@

And then run that as the remote rsync command:

    rsync -xlupogtSvve ssh --rsync-path=/usr/local/sbin/do_rsync \
        $src_host:"$COM" $targ_dir

That will cause the args that were split at spaces to get joined back
together and then split at the quotes.  It's a kludge, but it would
work.

..wayne..




More information about the rsync mailing list