Linux join utility complains about input file not being sorted

前端 未结 3 2022
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-03 01:35

I have two files:

file1 has the format:

field1;field2;field3;field4

(file1 is initially unsorted)

file2 has the format:

3条回答
  •  长发绾君心
    2021-01-03 01:57

    ... or the gnu sort is just as buggy as every other GNU command

    try and sort Gi1/0/11 vs Gi1/0/1 and you'll never be able to get an actual regular textual sort suitable for join input because someone added some extra intelligence in sort which will happily use numeric or human numeric sorting automagically in such cases without even bothering to add a flag to force the regular behavior

    what is suitable for humans is seldom suitable for scripting

提交回复
热议问题