Bash Sort like Windows 'natural sort order' Bash Sort like Windows 'natural sort order' bash bash

Bash Sort like Windows 'natural sort order'


Assuming you're using GNU sort, use the-V option:

   -V, --version-sort          natural sort of (version) numbers within text

For your input, it'd produce:

test1.pdftest2.pdftest10.pdf