1. 以tab键为分隔符的表示为: sort –t $’\t’ 如果不加$符号的话,会返回:sort: multi-character tab `\t'的错误。

2. 对中文进行排序, 需要加LC_ALL=C将locale设置成posix标准。因为有可能目前的设置可能导致中文排序不正常。

这是我的设置(修改前):locale

[linux shell]sort使用经验

相关文章:

  • 2022-12-23
  • 2021-05-28
  • 2021-11-13
  • 2021-06-26
  • 2021-12-12
  • 2022-01-05
  • 2022-12-23
猜你喜欢
  • 2021-11-14
  • 2022-12-23
  • 2022-12-23
  • 2021-06-19
  • 2022-12-23
  • 2022-03-01
相关资源
相似解决方案