I'm using the pv utility to asses the speed of log entries being added in a log file, like this:
tail -f -n 0 mylog.log | pv -lr -t -i 5 > /dev/null
This outputs the addition speed and refreshes every 5 sec:
0:00:05 [ 10/s]
Now, I would like to redirect the current value ("10") to a file and refresh it every 5s. Not append it, just overwrite the previous value in the file. Any idea on how to do the redirection to file? I'm pretty new in unix and haven't got it to work yet.
Thanks!