#
# !/bin/sh
# 功能描述:在当前文件夹下面递归查找.exe文件,并且删除之!
#
#
# shell 函数调用 : "函数名" + "参数列表"
#
function do_rm_exe() {
if [ `expr match $1 .*exe` -gt 0 ] ;then
echo rm -f $1
rm -f $1
fi
}
function recur_dir() {
file=`ls $1`
#echo $1
cd $1
for i in $ $file
do
if [ -f $i ]
then
echo $i
do_rm_exe $i
fi
if [ -d $i ]
then
recur_dir $i
fi
done
cd ..
}
CUR_DIR=`pwd`
recur_dir $CUR_DIR
# !/bin/sh
# 功能描述:在当前文件夹下面递归查找.exe文件,并且删除之!
#
#
# shell 函数调用 : "函数名" + "参数列表"
#
function do_rm_exe() {
if [ `expr match $1 .*exe` -gt 0 ] ;then
echo rm -f $1
rm -f $1
fi
}
function recur_dir() {
file=`ls $1`
#echo $1
cd $1
for i in $ $file
do
if [ -f $i ]
then
echo $i
do_rm_exe $i
fi
if [ -d $i ]
then
recur_dir $i
fi
done
cd ..
}
CUR_DIR=`pwd`
recur_dir $CUR_DIR