文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>解压缩的脚本

解压缩的脚本

时间:2008-04-18  来源:sdccf

作者:KornLee  出处:Unix爱好者家园unix-cd.com  
代码:
#!/bin/bash UNPACK=1 if [ ${1##*.} = bz2 ] ; then TEMP=${1%.*} if [ ${TEMP##*.} = tar ] ; then tar jxvf $1 UNPACK=$? echo This is a tar.bz2 package else bunzip2 $1 UNPACK=$? echo This is a bz2 package fi fi if [ ${1##*.} = gz ] ; then TEMP=${1%.*} if [ ${TEMP##*.} = tar ] ; then tar zxvf $1 UNPACK=$? echo This is a tar.gz package else gunzip $1 UNPACK=$? echo This is a gz package fi fi if [ ${1##*.} = tar ] ; then tar xvf $1 UNPACK=$? echo This is a tar package fi if [ $UNPACK = 0 ] ; then echo Success! else echo Maybe it is not a package or the package is damaged? fi
相关阅读 更多 +
排行榜 更多 +
辰域智控app

辰域智控app

系统工具 下载
网医联盟app

网医联盟app

运动健身 下载
汇丰汇选App

汇丰汇选App

金融理财 下载