The Samba-Bugzilla – Bug 10507
Structured Output (for Simpler Parsing)
Last modified: 2014-04-29 21:10:41 UTC
Currently the output from rsync for itemised output and stats is nice and human friendly, but it'd be nice if a flag could be set that would give output in an easier to parse format for scripts etc.
For example, with stats enabled all of the relevant stats may be given in the final line of output in a tab-delimited format in a specific, documented, order with all values in bytes, allowing a script to simply use awk or read to easily parse and process these.
While it is possible to parse the current output after a fashion, it's not guaranteed to remain consistent in future so I'm not sure whether it's safe to rely on the format, so something specifically intended (and optimised) for parsing would be better.
Just wanted to add that simplified parsing of itemised output would be nice too, and also with awareness for the --progress option, i.e; with itemised output enabled a single line for each file-list change would be provided, while with --progress at least one additional line will be provided for each file transfer indicating current or average speed and time elapsed.
Output for --progress could be periodic, for example every 10 seconds and on completion, but perhaps this should be configurable, so a script can decide whether to track progress over time (e.g - to give output to a user) or to simply wait till its done to record stats.