My Sample Text:

Please copy paste the following 7 lines in notepad. So that you can see there are spaces after each word. (Please note: number of spaces are not constant. In some place there are 16 spaces, and with no space also)

```
Gadu-Gadu                
Gadu-Gadu_file-transfer  
Gadu-Gadu_server
Gadu-Gadu_video          
Gadu-Gadu_voice          
GameKit
Generic\ Voice 

```

For example I have 16 spaces between "Gadu-Gadu and Gadu-Gadu\_file-transfer".

I want to remove the spaces, Then i want output as:

```
Gadu-Gadu
Gadu-Gadu_file-transfer
Gadu-Gadu_server
Gadu-Gadu_video
Gadu-Gadu_voice
GameKit
Generic\ Voice

```

NOTE : There is a space between "Generic\ Voice". This should not be removed by script. I want to remove only spaces that exists at the end of each word.

Please suggest me any awk or other programming script to achive this.

Thanks,

Kumar