123456789101112131415161718192021 |
- #!/bin/bash
-
- if [ "$1" = "" ]; then
- echo "Usage: munzip <file>";
- exit 1;
- fi
-
- if [ "$1" = *.tar.gz ]; then
- tar vxzf "$1"
- elif [ "$1" = *.tar.bz2 ]; then
- tar vjxf "$1"
- elif [ "$1" = *.tar.xz ]; then
- tar vxJf "$1"
- elif [ "$1" = *.zip ]; then
- unzip "$1"
- elif [ "$1" = *.tgz ]; then
- tar vxzf "$1"
- else
- echo "Unknown format."
- exit 1
- fi
|