Easy cat question

I am having problems getting a list of filenames that I want from a directory.

example: I have 3 files - filename.xxx.20110505.123030
filename.yyy.20110505.123030
filename.zzz.20110505.123030

There may be multiple xxx, yyy, or zzz files.

I want to be able to only pick up the xxx and zzz files. I tried this:

listxxx=`ls filename.xxx.201*.`
listzzz=`ls filename.zzz.201*.
`

cat $listxxx $listzzz > filelist

But when I run it, it puts the contents of the files in filelist instead of just the filenames. I need a list of the filenames so I can do further processing.

I'm sure there's an easy way to do this, but it is escaping me.

Thanks for all advice.

This will work.

# ls filename.xxx.201* filename.zzz.201* > myfile

PERFECT! Thanks so much. I knew it would be easy but it was driving me crazy.

ls filename.{xxx,yyy}.201* >myfile

---------- Post updated at 08:55 PM ---------- Previous update was at 08:54 PM ----------

Oooops sorry

i meant

ls filename.{xxx,zzz}.201* >myfile