Linux Compression Humanized
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

40 lines
714 B

#!/bin/bash
function decompressor()
{
case $1 in
*.tar)
tar -xvf $1
;;
*.tar.gz | *.tgz)
tar -xzvf $1
;;
*.tar.bz2 | *.tbz | *.tbz2 | *.tb2)
tar xjf $1
;;
*.tar.xz | *.txz)
tar -xf $1
;;
*.bz2)
bzip2 -d $1
;;
*.gz)
gzip -d $1
;;
*.zip)
unzip $1
;;
*.7z)
7za e $1
;;
*.rar)
unrar x $1
;;
*)
echo "Extension not found."
echo -e "For more information run 'lch --help'\n"
;;
esac
echo -e "\nDone"
exit 0
}