What is up with [A-Z] meaning [A-Za-z]?

后端 未结 3 592
暗喜
暗喜 2021-02-07 22:44

I\'ve noticed for a while now that, on some of the Unix-based systems I use at least, ls [A-Z]* has been giving me the results I would anticipate from ls [A-Z

3条回答
  •  暖寄归人
    2021-02-07 23:24

    It's actually [A-Za-y], and it has to do with language collation. If you want to override it then set $LC_COLLATE appropriately; either of C or POSIX should do.

提交回复
热议问题