On Fri, Oct 30, 2020 at 11:10:18AM -0700, Russell Lewis wrote:
> Question, then an idea:
>
> Q:
> Any reason to use wc -c over ls -al? Is one worse or better, or are they
> more or less the same? Maybe ls output requires more parsing?
Parsing ls output is not such a good idea.
I have seen scripts break when ls' output changed.
E.g. when the '+' character came into play.
> Idea:
> Instead of checking file size every thirty seconds and trying to be
> precise, you could just wait 10m at a time, and terminate when you see
> *any* window with no change. Worst case, you end up waiting 19.99 minutes,
> but that's probably acceptable for this application.
Larger intervals leads to more energy use.
But so does frequent polling.
Regards, Mike Jonkmans
--
Mike Jonkmans <bashbug@jonkmans.nl>