Unix sort treatment of underscore character

后端 未结 5 1000
半阙折子戏
半阙折子戏 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:48

    sort order depends on the current value of the environment variable LC_COLLATE. Check your local documentation for 'locale', 'setlocale', etc. Set LC_COLLATE to 'POSIX' on both machines, and the results should match.

提交回复
热议问题