rename

hi,

im doin an assignment which requires you to build a shell script to do the MS DOS style equivilant (sp?) of the rename function. What i have to do is a loop which checks the following rules and output messages (same):

Can't have anything after target
Can't have more than one dot
Can't have more than one asterisk
Doesn't exist
Must have a dot
No target

Targets consist of three parts: a dot, an asterisk and a string of filename characters. The dot is the middle one of the three. I have not started anything of yet as im stick on this first part and have little idea on how to do it. I an wondering if someone could give me a idea on how i would approach this. I have been told that a loop would be best.

Thanks

no homework questions please!