在Bash中,通配符扩展是否保证有序?

Bash中扩展的通配符是否保证按字母顺序排列?我被迫将一个文件拆分成10 Mb片段,以便我的Mercurial存储库可以接受它们.

所以我以为我可以使用:

split -b 10485760 Big.file BigFilePiece.

然后代替:

cat BigFile | bigFileProcessor

我可以:

cat BigFilePiece.* | bigFileProcessor

取而代之.

但是,我无法找到保证星号(也就是通配符,又名*)的扩展始终按字母顺序排列的地方,以便.aa在.ab之前出现(而不是时间戳排序或类似的东西).

另外,我的计划有什么缺陷吗?将文件组合在一起的性能成本有多大?

是的,全球扩张是按字母顺序排列的.

从Bash手册页:

Pathname Expansion

After word splitting,unless the -f option has been set,bash scans
each word for the characters *,?,and [. If one of these characters appears,then the word is regarded as a pattern,and replaced with an alphabetically sorted list of file names matching the pattern.

相关文章

用的openwrt路由器,家里宽带申请了动态公网ip,为了方便把2...
#!/bin/bashcommand1&command2&wait从Shell脚本并行...
1.先查出MAMP下面集成的PHP版本cd/Applications/MAMP/bin/ph...
1、先输入locale-a,查看一下现在已安装的语言2、若不存在如...
BashPerlTclsyntaxdiff1.进制数表示Languagebinaryoctalhexa...
正常安装了k8s后,使用kubect工具后接的命令不能直接tab补全...