There is a script that does something and spits out to stdout lines. (for example tail-f /var/log/messages).
I content that stdout is not necessary, but need in real time to see how many lines it spit out to stdout.
There are such utilities or scripts? and wants a bike to write.
UPD. solved forces awk and carriage return
tailf /some/file.log | awk 'BEGIN {C=0} ; {printf "\", C++" "}'
UPD2 hacked to use the built-in variables:
tailf /some/file.log | awk '{printf "\"NR}'