List files sorted numerically in bash

hi friends,
how to sort files by extension by numeric portion in bash please?

e.g I have below below files
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

enthuguyAuthor Commented:
Thx wollmilkporc for your quick help.

not getting the output in order. Is it possible to get in asec (lowest at the top) pls
Sorry, I noticed myself that my solution doesn't work - that's why I deleted my comment.

Let's see if  I can find a better solution!
enthuguyAuthor Commented:
Thanks very much :)
Your Guide to Achieving IT Business Success

The IT Service Excellence Tool Kit has best practices to keep your clients happy and business booming. Inside, you’ll find everything you need to increase client satisfaction and retention, become more competitive, and increase your overall success.

There is a GNU extension to "ls" which should do what you desire:

ls -1 -v*

Please note: "-1" is the digit "1", not the letter "l". We use it here to force one-column output.

Working on a solution with filenames in a file ...

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
enthuguyAuthor Commented:
Thx very much that helped! :)
for file in{1..1000}; do
    ls "$file"
enthuguyAuthor Commented:
thx mankowitz, I believe this will list up to even if the actual file "" doesn't exist?

pls correct me if I was wrong
it shouldnt. If the file is not there, ls should return empty.
enthuguyAuthor Commented:
oh Yeah, I was wrong...sorry

A possible solution for sorting a list of files "filelist":

sed 's/\(file\.name\.XMLSchema\)\(.*$\)/\1 \2/' filelist | sort -k2n | tr -d " "

The file names must not contain spaces for this solution to work!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Shell Scripting

From novice to tech pro — start learning today.