Shell script to find files

Hi Experts,
I am trying to write a shell script that should

  1. Find files with name (ab030.txt,Ab030.TXT,AB030.TXT,ab030.TXT,AB030.txt)
  2. If any of the above found, rename it to AB030.TXT

Thanks.

use this..

mv `ls [Aa][Bb]030.[Tt][Xx][Tt]` AB030.TXT

Thanks Vidhyadhar,

but doesn't work.

mv: cannot access ls [Dd][Mm]030.[Tt][Xx][Tt]

---------- Post updated at 04:32 PM ---------- Previous update was at 04:29 PM ----------

Hi Vidhyadhar,
Figured, but still it errors see below

mv: Target DM030.TXT must be a directory

Following is my script

#!/usr/bin/ksh
cd /home/oracle/temp
mv `ls /home/oracle/temp/[Dd][Mm]030.[Tt][Xx][Tt]` DM030.TXT

sorry I made a mistake

#!/usr/bin/ksh
cd /home/oracle/temp
for i in [Dd][Mm]030.[Tt][Xx][Tt] ; do
mv "$i" DM030.TXT
done

Thank Vidyadhar. Great It works