Created
July 15, 2014 19:18
-
-
Save ejhayes/3dc6efbd5b67259df829 to your computer and use it in GitHub Desktop.
Way to count lines in a big file that is compressed without having to decompress. Includes ability to monitor counting progress
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
zcat $FILENAME | pv -cN extracting -s $(gzip -l $FILENAME | awk '{ print $2 }' | tail -1) | wc -l |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment