I would like to use
tee to pipe content from
stderr respectively into files (in fact append it with
> >(tee -a $filename)). However, instead of seeing the contents appended to the file I would like to have some real progress indicator based on the piped content. Be it the number of lines in the output on the respective channel so far, or be it the number of characters or similar.
NB: Why did I emphasize real above? Because I am aware how to get a spinning baton through a subshell in the background and later kill it by keeping its PID stored. It's a nice moving thing, but doesn't really provide any indication about what's going on - i.e. it's snake oil.
btw: At the beginning the output file may not exist, so any solution with a subshell would have to consider this.