Skip to content

Instantly share code, notes, and snippets.

@Gabelbombe
Created March 21, 2017 08:58
Show Gist options
  • Save Gabelbombe/e0d1a4df2274029b17af590c4cf937b7 to your computer and use it in GitHub Desktop.
Save Gabelbombe/e0d1a4df2274029b17af590c4cf937b7 to your computer and use it in GitHub Desktop.
Better UnTar/GunZipper
#!/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