lijunhao189
lijunhao189
2018-12-10 08:25

linux shell如何根据截取某个字段多少位进行去重?

10
  • linux
  • 去重
  • 字段截取

想使用linux shell对一个文本文件中某个字段截取前特定位数,然后去重,比如
25ds51dd225d86af,20180725115911,22570,20443,120.17138,30.119047
002a51dd225d86af,20180725120017,22570,184680195,120.176506,30.11527
002a51dd225d86af,20180725120058,22290,80489347,120.1810786,30.10003
002a51dd225d86af,20180725120149,22290,80489345,120.1810786,30.10003
002a51dd225d86af,20180725120209,22290,189880577,120.18859,30.093405
102a51dd225d86af,20180725120239,22290,155606668,120.1990471,30.0961
002a51dd225d86af,20180725120303,22290,155606666,120.1990468,30.0961
002a51dd225d86af,20180725120434,22290,193501442,120.220661,30.09723
002a79ded185cb04,20180725125428,22570,185263107,120.1576002,30.1293
002a79ded185cb04,20180726125649,22290,80489347,120.1810786,30.10003
,如何根据第一个字段、第二个字段截取前8位进行排序去重?

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

3条回答