#!/usr/bin/ksh
#write by cnhawk
#for delete all the match time file
#such as ash_2005-01-15.log with for
#date 2005-11-23
for x in 2004 2005
do
for y in 01 02 03 04 05 06 07 08 09 10 11 12
do
for z in 01 02 03 ... 31
do
for files in $(ls *$x-$y-$z*)#var replace ls match files
do
echo "the $files in match will be delete!"
rm $files
done
done
done
done
|
|
|