I'm trying to count the lines from a command and I'd also like to see the lines as they go by. My initial thought was to use the tee
command:
complicated_command | tee - | wc -l
But that simply doubles the line count using GNU tee
or copies output to a file named -
on Solaris.