标题: 帮我看一下这个shell 谢谢各位大哥了 [打印本页] 作者: lingg2002 时间: 2004-05-28 20:02 标题: 帮我看一下这个shell 谢谢各位大哥了 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