Skip to content

Instantly share code, notes, and snippets.

@bdombro
Last active August 29, 2015 14:01
Show Gist options
  • Save bdombro/159f9e153798c61f6735 to your computer and use it in GitHub Desktop.
Save bdombro/159f9e153798c61f6735 to your computer and use it in GitHub Desktop.
#!/bin/bash
if [[ "$#" == 0 ]]; then
echo "
Version 1.0
Fancy zcat that shows progress.
Arg should be a gziped file ending in .gz
Syntax: bzcat <path_to_file_or_folder>
"
exit
fi
SRC=$1
gunzip -c $SRC | pv -s $(gzip -l $SRC | awk '{print $2}' | sed -n 2p)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment