help in ls command

Hi guys,

I want to list file based on the 4th and 5th posistion.

My filenames are

Week012011.txt
Week052011.txt
Week032011.txt
Week062011.txt
Week022011.txt
Week042011.txt

So, i want the output as

Week012011.txt
Week022011.txt
Week032011.txt
Week042011.txt
Week052011.txt
Week062011.txt

Can somebody help me out..

Cheers!!!

i think a simple sort command will solve your problem, because all the characters that are before the ones you want to sort on are the same ,
or you can combine both ls and sort with |
try

 sort(filename)
cat test.txt | sort -n

Yeah i missed tat... thanks guys... :slight_smile: