[wellylug] Shell script problem
John Fouhy
john at fouhy.net
Thu Nov 1 11:56:43 NZDT 2007
Hi all,
My environment is cygwin, rather than linux, but I hope that is not
too off-topic for the list.
I have a script that looks like this:
-----
#!/bin/sh
SOURCE=/cygdrive/d
DEST=10.1.1.77::backup/Shaft/
EXCLUDES='--exclude="saswork/" --exclude="pagefile.sys" --exclude="*.tmp"'
rsync -vva $EXCLUDES $SOURCE $DEST
-----
Problem: rsync ignores the excludes -- that is, it behaves as if the
command line is 'rsync -vva $SOURCE $DEST'.
If I change the last line to look like this:
echo rsync -vva $EXCLUDES $SOURCE $DEST
and then copy/paste the resulting command line into a bash terminal,
then it works as I want.
Can anyone offer any suggestions?
--
John.
More information about the wellylug
mailing list