link_stat

Wayne Davison wayned at samba.org
Sat Jul 23 16:37:32 GMT 2005


On Sat, Jul 23, 2005 at 01:40:08PM +0100, livau at gmx.net wrote:
>  rsync $attr $bDir $rSvr:$rDir$tDay $sufx

This is a shell-programming error -- this tells rsync to copy 3 local
files to a dir name that is the last word in $sufx, which happens to be
a file named friday.log.  Thus, rsync complains that two local files in
the current directory don't exist, one with a weird name (based on your
$rSvr:$rDir$tDay expansion) and one with the name ">>" (which was
word-split out of $sufx).

You need to remove all shell-special characters from inside variables
because the shell does not evaluate them inside a variable expansion
(not without using "eval" to tell the shell to re-parse the resulting
string).  Explicitly, you'd need to dump the ">>" from $sufx and remove
the double-quotes from inside $attr.  Then, change your rsync-executing
line to this:

  rsync $attr $bDir $rSvr:$rDir$tDay >> $sufx

..wayne..


More information about the rsync mailing list