String matching

for a certain directory, I want to grep a particular file called ABCD so what I do is

ls /my/dir | grep -i "ABCD" | awk '\{print $9\}'

however, there is also this file called ABCDEFG, the above command would reurn both file when I only want ABCD, please help!

Move the sed logic in awk :

ls -l /my/dir | awk 'toupper($9)=="ABCD" {print $9}'

Jean-Pierre.

Or:

Regards

thanks you guys! you guys ROCK!