Jim Meyering wrote:
...
> +# Wait up to 2s for the buggy tail to die,
> +# or for the "tail: `1' has appeared; following end of new file" output
> +dead=0
> +for i in $(seq 10); do
> + kill -0 $pid || { dead=1; break; }
> + grep 'has appeared;' out > /dev/null && break
> +done
I've re-added the sleep above, so that the comment is still accurate:
for i in $(seq 10); do
kill -0 $pid || { dead=1; break; }
grep 'has appeared;' out > /dev/null && break
sleep .2
done
