tarcount=$1 islua=`echo *_virdir` echo =$islua= if [[ $islua != "*_virdir" ]]; then if [ -d ../zipluadir ]; then rm -rf ../zipluadir fi mkdir ../zipluadir # echo count==$tarcount= for (( i = 1; i <= $tarcount; i++ )); do echo i=$i if [ -d $i ]; then if [ -d $i_virdir ]; then zip -qr ../zipluadir/game$i.zip ./$i fi fi done else if [ -d ../ziph5dir ]; then rm -rf ../ziph5dir fi mkdir ../ziph5dir for (( i = 1; i <= $tarcount; i++ )); do #statements if [ -d $i ]; then zip -r ../ziph5dir/game$i.zip ./$i fi done fi
使用 cd workpath
./zipshell 4
原文地址:https://www.cnblogs.com/lesten/p/11603998.html
时间: 2024-10-22 05:30:30