Bash Sort like Windows 'natural sort order'

前端 未结 1 660
说谎
说谎 2020-12-16 09:59

I\'ve got a bunch of PDFs that I\'m trying to append together, and I\'ve got a program that, given a list of files, will append them to one PDF.

The issue I\'m havi

相关标签:
1条回答
  • 2020-12-16 10:12

    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.pdf
    test2.pdf
    test10.pdf
    
    0 讨论(0)
提交回复
热议问题