文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>remove file which suffix with .ptl

remove file which suffix with .ptl

时间:2009-04-30  来源:vincent-cws

#! /bin/sh -

foreach_dir () {
    for file in $1/*
    do
        if [ -d "$file" ]; then
       dir_name="$(basename $file)"
       if [ "${dir_name#_arm9e_}" != "$dir_name" ]; then
          basepath="$(dirname $file)"
          path_name=$(dirname $basepath)
          temp=${path_name#*modules/}
          module_name=${temp%%/*}
          gen_file="$basepath/$module_name.gen"
          if [ -f "$gen_file" ]; then
             /bin/grep 'TYPE=void' "$gen_file"
         if [ $? -ne 0 ] ; then
             /bin/rm $file/*
             if [ $? -eq 0 ]; then
             echo "DIR: $file/*.*  -- remove success!"
             echo "DIR: $file/*.*  -- remove success!" >>  ~/remove_ptl.log
             else
             echo "DIR: $file/*.*  -- remove failed!"
             echo "DIR: $file/*.*  -- remove failed!" >> ~/remove_ptl.log
             fi
         else
             echo "xxxxxxxxxxxxxxxxxx" > /dev/null
         fi    
          fi
       fi
           foreach_dir "$file"
        else
    #do something here
        echo "ok" > /dev/null
     fi
    done
}

/bin/touch ~/remove_ptl.log

foreach_dir "$@"
相关阅读 更多 +
排行榜 更多 +
2025pubg国际服最新版本

2025pubg国际服最新版本

飞行射击 下载
pubg国际服地铁逃生最新版本2025

pubg国际服地铁逃生最新版本2025

飞行射击 下载
火柴人大乱斗4游戏

火柴人大乱斗4游戏

飞行射击 下载