tri*_*tof 3 linux unix sorting filenames microsoft-excel
我有以下根据 Excel 排序的文件列表:
a1.txt
a10.txt
a11.txt
a12.txt
a2.txt
Run Code Online (Sandbox Code Playgroud)
如果我sort
在 Unix/Linux 上使用,我会得到以下命令:
a10.txt
a11.txt
a12.txt
a1.txt
a2.txt
Run Code Online (Sandbox Code Playgroud)
您可以在其中看到角色的不同行为.
。是否可以选择获得与 Excel 相同的订单?我尝试了-b,-g,-n,...但没有成功。
env LC_ALL=C sort
Run Code Online (Sandbox Code Playgroud)
从man
页面sort
:
*** WARNING *** The locale specified by the environment affects sort
order. Set LC_ALL=C to get the traditional sort order that uses native
byte values.
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
891 次 |
最近记录: |