I would add, do not parse ls for reasons seen here
For example, on my system your code will return nothing as all file and directory names are in the 8th column and I have no 9th.
I am curious though, is there anything wrong with simply using ls and the shell to return what you want:
$ cd /etc
$ ls [an]*.conf
Not sure if I missed a requirement here?