In zsh, the
glob modifier ‘*(n)’ will expand to files in natural sort order.
When writing C programs, the GNU libc library (‘glibc’)
provides the
strverscmp(3) function to compare two strings, and
versionsort(3)
function to compare two directory entries (despite the names, they are
not identical to GNU Coreutils version sort ordering).