path=$1
arrs=(20190618)
for ip in ${arrs[@]};
do
tmp=$path$ip
filelist=`ls $tmp`
for file in $filelist
do
echo $path$file
if test -f $file
then
echo $file is file
else
echo $file is dir
#$cd $file
parent=$tmp'/'$file
tmpfilelist=`ls $parent`
for tmpfile in $tmpfilelist
do
strfile='_imgs'
if test -f $tmpfile
then
echo 'file:'$tmpfile
else
echo 'tmpfile:'$parent'/'$tmpfile
if [[ $tmpfile == *$strfile* ]]
then
echo 'equal files:'$tmpfile
else
son=$parent'/'$tmpfile
if [ "${son##*.}" = "theme" ]
then
echo 'delfile11:' $son
rm -f $son
fi
echo 'delfile:'$son
#echo $son'/icon'
rm -rf $son'/icon'
fi
fi
done
#echo 'del:' $1$file'/temp'
#rm -rf $1$file'/temp'
fi
done
done
阅读(813) | 评论(0) | 转发(0) |