下面是我的示例数据。我的环境是centos,我运行此命令将所有内容组合成一个单独的空间sed' s / * / \ / g'但不幸的是,空间仍然不统一。任何解决方案?
308589422 3.10882 101.54966 23 0 215 0.9 2011-08-01 00:00:00 1 00402020F028 00 000 0 00 109.6 13033 4D \N \N \N \N \N \N
308590571 5.00517 102.22741 20 0 340 0 2011-08-01 00:00:00 1 00000000 27.3 012 0 04.0 154856 BB1012 \N \N \N 01 0100 0
308596673 2.94121 101.76445 29 0 62 0 2011-08-01 00:00:00 1 00000000 25.4 000 0 04.1 56870.5 AB0569 \N \N \N 02 0000 F
308596708 3.99147 101.05772 15 0 105 0 2011-08-01 00:00:00 1 00000000 12.6 01B 0 04.1 42562.9 AB0829 \N \N \N 02 0000 F
308589424 5.4142 100.55539 26 0 126 1 2011-08-01 00:00:01 1 01000028F820 57 3FF 0 F5 1082.31 13276 75 \N \N \N \N \N \N
308589482 4.95754 102.07095 3 96 235 0 2011-08-01 00:00:01 1 00000000 27.0 000 0 04.1 10278.9 BB1788 \N \N \N 01 0100 F
答案 0 :(得分:1)
我会推荐sed的/ \ s + / / g'(\ s +匹配任何可重复的空格,而不仅仅是空格字符)