iwc(1)
is an interactive wc(1)
. It mostly works like the original wc
but prints the lines number as it counts them
instead of waiting for the end to print it.
brew install bfontaine/utils/iwc
git clone https://github.com/bfontaine/iwc.git && cd iwc
git checkout v0.1.3 # last stable version
[sudo] make install
$ iwc myfile.txt
See the man page for all available options.
You can combine iwc
with tail -f
to follow the number of lines in a file
that’s constantly growing (like logs):
$ tail -f -n +1 your_file | iwc -l