浏览代码

added munzip command

master
mort 8 年前
父节点
当前提交
ea3e119cb1
共有 1 个文件被更改,包括 17 次插入0 次删除
  1. 17
    0
      bin/munzip

+ 17
- 0
bin/munzip 查看文件

@@ -0,0 +1,17 @@
#!/bin/bash

if [ "$1" = "" ]; then
echo "Usage: munzip <file>";
exit 1;
fi

if [ "$1" = *.tar.gz ]; then
tar xzf "$1"
elif [ "$1" = *.tar.bz2 ]; then
tar jxf "$1"
elif [ "$1" = *.zip ]; then
unzip "$1"
else
echo "Unknown format."
exit 1
fi

正在加载...
取消
保存