[Bug 2647] --exclude options work from commandline but not in script

samba-bugs at samba.org samba-bugs at samba.org
Tue May 17 07:11:33 GMT 2005


https://bugzilla.samba.org/show_bug.cgi?id=2647





------- Additional Comments From wayned at samba.org  2005-05-17 00:11 -------
> ### Script 3 (works as expected)

If by "works as expected" you mean that it excludes a file whose name is a
single apostrophe whose grandparent directory also has a name of a single
apostrophe.  (That's certainly what I expect it to do, and what it actually does
too.)  Maybe you meant to write this VAL assignment?

VAL='/whatever/'

Keep in mind that shell-special characters are not re-parsed when expanding
variables (which would be very bad) unless you use eval.  It may also help to
note that writing --exclude='foo' is exactly the same as writing '--exclude=foo'
(it's just that the former seems more natural to most people), so there's no
need for all the extra quotes in what you're trying to do -- just quote the
values when assigning them to a variable and they'll be fine.

-- 
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.


More information about the rsync mailing list