<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
-----BEGIN PGP SIGNED MESSAGE-----<br>
Hash: SHA1<br>
<br>
No. I traced the heck out of it (bash -vx ...) and I was actually
sending a null parameter as the first argument to rsync and that
made it get out of bed on the wrong side.<br>
<br>
Here are some more details as to what happened:<br>
<br>
<a class="moz-txt-link-freetext" href="http://askubuntu.com/questions/112717/rsync-copies-files-from-working-directory-in-addition-to-the-requested-ones/113431">http://askubuntu.com/questions/112717/rsync-copies-files-from-working-directory-in-addition-to-the-requested-ones/113431</a><br>
<br>
Essentially, rsync worked, but additionally processed all the files
in the current working directory when that wasn't expressly
requested. Since null parameters are almost totally invisible, it
took awhile to find.<br>
<br>
Sorry I didn't include more details in my original post.<br>
<br>
On the bright side, this is what caused me to join this list. I've
learned a lot - mostly by lurking.<br>
<br>
Thanks.<br>
Joe<br>
<br>
On 11/04/2012 10:35 PM, Kevin Korb wrote:<br>
<span style="white-space: pre;">> I suspect you are missing a
space somewhere and are ending up with 2<br>
> parameters stuck together. You can have bash output the rsync
command<br>
> line it intends to run to make sure or you can just use " "
instead of<br>
> "" as extra spaces between parameters will have no effect.<br>
><br>
> On 11/04/12 22:23, Joe wrote:<br>
> > I'm working on a bash backup script using rsync.
(kubuntu precise<br>
> > 12.04, rsync 3.0.9-1ubuntu1)<br>
><br>
> > To avoid having a number of slightly different rsync
commands, I<br>
> > would like to use shell variables as part of the rsync
command.<br>
> > I.e.: DRYRUN="-n" rsync "${DRYRUN}" more parameters ...<br>
><br>
> > This does not work if DRYRUN="" - apparently because
this command<br>
> > becomes rsync "" more parameters ... instead of rsync
more<br>
> > parameters ...<br>
><br>
> > and rsync uses the null parameter for something and does
not<br>
> > perform as expected. It does not generate any error or
diagnostic<br>
> > message.<br>
><br>
> > Is there a way to get around this problem - other than
coding each<br>
> > permutation of the command separately?<br>
><br>
> > I'm experimenting with putting the whole rsync command
in a string<br>
> > so I can run it after any null parameters revert to pure
white<br>
> > space. Once I get the quoting to work (preserving those
quotes I<br>
> > still need), this method should work, but it's less than
elegant.<br>
><br>
> > Is this a bug in rsync? (Shouldn't it at least
complain/error exit<br>
> > if it gets something like this that it doesn't
understand?) If it<br>
> > is, what's the best way to report it?<br>
><br>
> > Ideally (for me anyway), I would like it to completely
ignore any<br>
> > null parameters, but I don't know what problems that
might cause<br>
> > for other people.<br>
><br>
> > TIA<br>
><br>
> > Joe<br>
><br>
></span><br>
-----BEGIN PGP SIGNATURE-----<br>
Version: GnuPG v1.4.11 (GNU/Linux)<br>
Comment: Using GnuPG with Mozilla - <a class="moz-txt-link-freetext" href="http://www.enigmail.net/">http://www.enigmail.net/</a><br>
<br>
iQEcBAEBAgAGBQJQl2zyAAoJELWM3hHMxTQOhfQH+wWnHVU/b9PcvdH76fdR3E5O<br>
/Fu12vOR5+E8oX0HTWnAF+mLX6u7GpBt1YcEQNJQ4KggFtXeMfkkALY0bkvJJ90d<br>
tje/MAM8K7paH41QAYmUmnrWLa7iQ7kM2CM+9eHIg89sfyt71LlanvKctKY+CXuK<br>
4Ny4DbQiqzD6cfD1CsvXjo2v87XoBgX9JS4zDSLSPWYkXm75vU1PUhT7LO1RC5zl<br>
NETiRNXFRFEhYE2Zk3qvg2p88NcUHPg8xsMK2J2UeLDcV8pMl7DLFmps1ObjD943<br>
2YpKVvdrc/Nfm79HxCGh36jCOJqscVNbk70/UN9raKmRqE7II1nsZNWulSrGnu4=<br>
=4KQM<br>
-----END PGP SIGNATURE-----<br>
<br>
</body>
</html>