Welcome to the Monastery | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Is there a way to handle output from another program that does not use line breaks in some of it's output?
I am piping Rsync's output to a perl script so that I can see Rsync's file transfers as they happen. The problem is that Rsync outputs the file transfer progress without line breaks, and only sends a line break after each transfer is complete. I think Rsync does this so that when you run in from the command line the percentage number just changes instead of filling your terminal screen with lots of lines. So I want to be able to view the <STDIN> data before the final line break is sent. Any ideas? Or should I scrap this idea and just send the output of Rsync to a log file and have Perl evaluate the tail of the log file every few seconds? Thanks! In reply to using STDIN that has no line breaks by macguide
|
|