【发布时间】:2015-07-04 00:33:07
【问题描述】:
我有一个制表符分隔的文本文件,格式如下。
Col1 | Col2 | Col3
123.0 | 534.2 | Blah0 2031/23/12
23.00 | 786.2 | Blah1 2033/01/01
12.40 | 343.0 | Blah2 2031/27/11
我需要删除最后一列空格后的所有字符。所以我的输出是
Col1 | Col2 | Col3
123.0 | 534.2 | Blah0
23.00 | 786.2 | Blah1
12.40 | 343.0 | Blah2
我应该如何使用Awk 或类似的东西来解决这个问题?
【问题讨论】:
标签: linux bash text awk text-processing