in reply to Re: User Feedback for Subroutines with Long Execution Time
in thread User Feedback for Subroutines with Long Execution Time

In a similar project, I wanted to run an arbitrary subprocess that wasn't designed with progress in mind. I relied on the parent (progress monitoring) process having either (1) an initial guess as to the number of lines of STDOUT output, or (2) a process-specific way of converting a line of STDOUT output into a percent-complete guess.

For example, to monitor a long tar jcvf $date.home.tar.bz2 /home process, you can either figure out how many files that tar will have to process and then count actual output lines, or you can try to watch the naturally sorted filenames ("./meetings/..." is roughly halfway through the alphabet) for a gut-check guess.

--
[ e d @ h a l l e y . c c ]