Unix sort treatment of underscore character

后端 未结 5 972
半阙折子戏
半阙折子戏 2020-12-30 01:16

I have two linux machines, on which unix sort seems to behave differently. I believe I\'ve narrowed it down to the treatment of the underscore character.

If I run

5条回答
  •  伪装坚强ぢ
    2020-12-30 01:37

    You can set LC_COLLATE to traditional sort order just for your command:

    env LC_COLLATE=C sort tmp
    

    This won't change the current environment just the one in which the sort command executes. You should have the same behaviour with this.

提交回复
热议问题