How to grep mix of numbers and systemdate?

Hi Guys,

i'm beginner in UNIX commands, need some help on this simple question:
I need to make a shell script to move files to another directory,
the criterias are :

  1. the range of 4 last digit of the file name is 0100-0199
  2. move all files that processed daily (let's say today is 22Dec'08)

so if i have these processed files in my folder, those 3 files(BOLD) should be moved :

XMAS200811100100.txt
XMAS200811110100.txt
XMAS200812150105.txt
XMAS200812220100.txt
XMAS200812220200.txt
XMAS200812220199.txt
XMAS200812220177.txt

how to write a shell script to read that kind of format(mix of range numbers and system date) and move it to another folder? :confused:

Thanks a lott....

I put my example to a file, and then used cat to show the output. The cat command is not really needed, you could pipe your ls output directly to the grep part of my example.

> cat file121
XMAS200811100100.txt
XMAS200811110100.txt
XMAS200812150105.txt
XMAS200812220100.txt
XMAS200812220200.txt
XMAS200812220199.txt
XMAS200812220177.txt
> today=`date "+%Y%m%d"`
> cat file121 | grep "XMAS${today}01[0-9][0-9].txt"
XMAS200812220100.txt
XMAS200812220199.txt
XMAS200812220177.txt

to expand on the example above:

today=`date "+%Y%m%d"`
for i in `cat file121 | grep "XMAS${today}01[0-9][0-9].txt"`; do
mv $i <dest_directory>
done