In trying to write a nice GUI for rsync, it was difficult to read
rsync's stdout
when using --progress, as --progress uses \r to make things pretty on
a terminal,
but it's painful to read into another process.
The attached patch made it much easier for me to read and parse the output from
--progr
On Thu 11 May 2006, Ryan T. Sammartino wrote:
> In trying to write a nice GUI for rsync, it was difficult to read
> rsync's stdout
> when using --progress, as --progress uses \r to make things pretty on
> a terminal,
> but it's painful to read into another process.
Well... shouldn't be that much
Well... shouldn't be that much of a problem? Putting this tr command in
the pipe should help:
tr '\r' '\n'
You assume I am working in a sane environment. :)
A bigger issue may be that output is buffered when writing into a pipe,
which means you only get rsync's output when the buffer is