OK, refiz este script e, classificando-o de trás para frente, parece que deve funcionar. Ele compara o ano e o mês com o anterior e, se for menor, deve ser a última entrada desse mês.
#!/bin/bash
#the tac reverses the listing, so we go from newest to oldest, vital for our logic below
FILES='ls | tac'
#create a cutoff date by taking current date minus our 60 day limit
CUTOFFDATE='date --date="60 days ago" +%Y%m%d'
#we are setting this value to month 13 of the current year
LASTYEARMONTH='date +%Y'13
for file in $FILES; do
#get datestamp
FILEDATE='expr match "$file" '.*\(20[0-9][0-9][0-9][0-9][0-9][0-9]\)''
#get year and month, ie 201410
THISYEARMONTH=${FILEDATE:0:6}
if [ ! -z $FILEDATE ] && [ $THISYEARMONTH -lt $LASTYEARMONTH ]; then
echo "$file IS THE LAST FILE OF THE MONTH. NOT DELETING"
else
#now we see if the file is older than 60 days (ie, has a LOWER unix timestamp than our cutoff)
if [ ! -z $FILEDATE ] && [ $FILEDATE -lt $CUTOFFDATE ]; then
echo "$file has a file date of $FILEDATE which is older than 60 days."
#uncomment this next line to remove
#rm $file
fi
fi
LASTYEARMONTH=$THISYEARMONTH
done