Removing blank space using VI

Hi,

How to remove blank spaces using vi (I am using AIX)?

#cat siva.txt
AAA    BBB
CCC    DDD
EEE    FFF

Need to remove space between 2 columns.

Regards,
Siva

Try :%s/\s//g

No luck XL

Did you run vi against the file first:

#vi siva.txt

Then type colon ( : ) the cursor should then move to the bottom of the screen and display a colon prompt you then type :%s/\s//g and enter to apply the search/replace

Then use either ZZ (two capital z) or :x and enter to save the file and exit vi

Yes, tried against with VI only, it throws below error. BTW i am using AIX VI

 0602-071 No match exists for the substitute pattern

How about this

1,$s/    //g

Sorry ckwan.. not working

To remove the first two contiguous spaces on every line that has two contiguous spaces:

:g/  /s///