How to sort files based on file name having numbers

Right now there is no unix direct commad that can sort the files base on its name having numbers:
We can use the following:

In case your file name are like:
abc-UP018.zip
xyz-UP019.zip

ls *|sort -t'-' -k2

What is your question?
Anyway, shouldn't that be: ls | sort -t'-' -nk2.3

Thanks for your feedback.

  • this was not a question but an information.
  • yes, we can use the one given by you in case the name pattern UP<number>.zip is not the same.