checking jump sequence number (part2)

The following script have some bug...can you all help me:

#!/bin/sh
start=1
for file_number in `ls -1 /appl/CH_DATA/archive/list1/CACHE/CDBACKUPFILEJohn*.archived | sort | cut -c 48,49,50,51`
do
if [ $start -eq 1 ] ; then
# this is the first pass of the loop, so we've got nothing to compare
start=0
previous=$file_number
else
# this is not the first pass of the loop
previous=`expr $previous + 1`
#echo "comparing $file_number and $previous ... "
if [ $file_number = $previous ] ; then
echo "ok"
else
echo "file names $file_number are not in sequence "
fi
fi
previous=$file_number
done

For the above, I have problem to list CD*.archived in directory, because of I have same filename with *.archived and *_bup.archived.

1 - I just want to list out CD*.archived
2 - I have alot filename like CDBACKUPFILEJohn*, CDBACKUPFILEMARRY*, CDBACKUPFILEPETER*, etc. Can I put all name into the name.txt and
the script can read the name.txt and put into the scrip like CDBACKUPFILE$name?

Thanks!!

If you dont want _bup.archived, use grep -v option in the ls command .

ls -1 /appl/CH_DATA/archive/list1/CACHE/CDBACKUPFILEJohn*.archived | grep -v _bup.archived | sort | cut -c 48,49,50,51

Thank's it work! How about the filename "John" can I read from the list.txt (because of over 300 different filename) and check the seq?

I have a list.txt (over 300 name) like:

john
marry
peter
annie

can my script read it and put into like "CDBACKUPFILEjohn*.archived", "CDBACKUPFILEmarry*.archived" to check jump seq number?