davidb
davidb

Reputation: 3

remove groups of spaces

I have a text file where I want to remove groups of 2 or more space characters for each line.

Here is an example of a line:

Company Management                                      Company Management                                      Company Management Reports                              Shipment - Text                                                                     Program                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             

Here is what it should be:

Company Management  Company Management  Company Management Reports  Shipment - Text Program

Note: There is a tab character before each "column"

Note 2: Each line has either 4 or 5 "columns"

Upvotes: 0

Views: 63

Answers (1)

Ed Morton
Ed Morton

Reputation: 204035

sed 's/   *//g' file

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

Upvotes: 1

Related Questions