Created
March 21, 2017 08:58
-
-
Save Gabelbombe/e0d1a4df2274029b17af590c4cf937b7 to your computer and use it in GitHub Desktop.
Better UnTar/GunZipper
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
#!/usr/bin/env bash -xe | |
if ! hash pigz 2>/dev/null ; then echo -e 'PigZ required..' ; return 3 ; fi | |
if ! hash pv 2>/dev/null ; then echo -e 'PV required..' ; return 3 ; fi | |
[ -f "${1}" ] && { | |
pigz -dc "${1}" |pv |tar -xf - | |
} || { | |
echo -e "${1} does not exist.." ; return 4 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment