Bug 10507 - Structured Output (for Simpler Parsing)
Summary: Structured Output (for Simpler Parsing)
Status: NEW
Alias: None
Product: rsync
Classification: Unclassified
Component: core (show other bugs)
Version: 3.1.0
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Wayne Davison
QA Contact: Rsync QA Contact
Depends on:
Reported: 2014-03-20 11:10 UTC by Haravikk
Modified: 2014-04-29 21:10 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Haravikk 2014-03-20 11:10:53 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.
Comment 1 Haravikk 2014-04-29 21:10:41 UTC
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.