[Bug 11656] Escaping broken with --files-from
samba-bugs at samba.org
samba-bugs at samba.org
Wed Dec 30 22:41:47 UTC 2015
https://bugzilla.samba.org/show_bug.cgi?id=11656
--- Comment #2 from Gennady Uraltsev <gennady.uraltsev+bugs at gmail.com> ---
Actually this doesn't help.
$ mkdir src; mkdir dst; touch src/"$(echo -e 'foo\nbar')"
$ rsync -n --out-format='%n' src/* dst/| tr '\n' '\0' | rsync -v --from0
--files-from=- src/ dst
still fails completely. The problem is that the escaped string
foo\#012bar gets all mangled up. So I think that --from0 doesn't exactly solve
the problem.
The only way to solve the problem is
$ rsync -n --out-format='%n' src/* dst/| tr '\n' '\0'| sed 's/\\#012/\n/' |
rsync -v --from0 --files-from=- src/ dst
but maybe we could agree that this is needlessly complicated. A more consistent
way of dealing with this would be great especially bearing in mind that this
failure is not documented...
Finally it is still completely unexpected that
foo\#012bar
gets changed into
foo\#134#012bar
Anyway the problem with space delimited strings is more as follows. Immagine I
want to parse the log file generated with --out-format='%n %h %M %C' in a
reliable way by some external program. Without consistent and documented
escaping there seems no way to do this.
--
You are receiving this mail because:
You are the QA Contact for the bug.
More information about the rsync
mailing list