Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[tlug] Strange shell quoting issue



Shell gurus, why does this not work?


: jglover@example.com; cat `which sync-script`

RSYNC="rsync -e ssh -av --exclude .\*"

echo ${RSYNC} ./ somehost.example.com:/some/dir/
${RSYNC} ./ somehost.example.com:/some/dir/

: jglover@example.com; ls -a
.FILE-THAT-SHOULD-NOT-BE-XFERED
file-that-should-be-xfered
: jglover@example.com; sync-script
rsync -e ssh -av --exclude .\* ./ somehost.example.com:/some/dir/
building file list ... done
./
.FILE-THAT-SHOULD-NOT-BE-XFERED
file-that-should-be-xfered
wrote 9769 bytes  read 36 bytes  1782.73 bytes/sec
total size is 961626  speedup is 98.08


Obviously, I am trying to exclude the .FILE-THAT-SHOULD-NOT-BE-XFERED, and if I paste the rsync command that is echoed into the term, it works as expected, so I am getting done over by quoting somehow.

I have tried all of the following, as well:

RSYNC="rsync -e ssh -av --exclude '.*'"
RSYNC="rsync -e ssh -av --exclude '.\*'"
RSYNC="rsync -e ssh -av --exclude .*"
RSYNC="rsync -e ssh -av --exclude ".\*

WTF?

--
Cheers,
Josh


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links