I'm writing a bash script which runs a program which is known to take N seconds to run (N is big); but - it does not itself report progress. For sake of simplicity, let's assume it produces no output at all.
Now, in my script, I want to report to the user how much time is left, and perhaps how much is elapsed, while that program is running. It would be nice if I could:
- do it even if my script is backgrounded (but running) on the terminal
- have a progress bar or some kind
Is there some bash-plus-common-shell-utilities mechanism which provides this kind of ability? Or do I have ti implement it from "scratch" myself, by sleeping before every update etc.?