#!/bin/bash
cd /data/dl/icon/app

pngs=$(ls -l|awk '{print $9}')

#echo $pngs
for file in $pngs; do
  new_file="${file%%.*}.png"
  if [[ ! -e "$new_file" ]]; then
#    echo "$file:未能重命名"
#  else
     mv "$file" "$new_file"	  
  fi	  
done

for file in $pngs; do
  if [[ $file =~ ^[^.]*\.[^.]*\.png$ ]]; then
    $echo "删除:$file"
    rm $file
  fi
done
