删除空格组

时间:2013-04-05 18:33:26

标签: sed awk solaris

我有一个文本文件,我想删除每行的2个或更多空格字符组。

以下是一行示例:

Company Management                                      Company Management                                      Company Management Reports                              Shipment - Text                                                                     Program                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             

这应该是:

Company Management  Company Management  Company Management Reports  Shipment - Text Program

注意:每个“列”前都有一个制表符

注2:每行有4或5个“列”

1 个答案:

答案 0 :(得分:1)

sed 's/   *//g' file

..............