Removing extra unwanted spaces

hi,

i need to remove the extra spaces in the filed.

Sample:

abc~bd ~bkd123 .. 1space
abc~badf  ~bakdsf123 .. 2space
abc~bqed   ~bakuowe .. 3space

output:

abc~bd ~bkd123 .. 1space
abc~badf~bakdsf123 .. 2space
abc~bqed~bakuowe .. 3space

i used the following command,

nawk -F\~ 'OFS=FS { gsub(" ", "", $2) }1'

I need to remove the space for the second column.
But it doesnt remove if it has more than one space.

Please help

You already have another thread open with this exact same problem (except for the delimiter) and two pages of responses (to which you have not responded). This thread is unnecessary.

i couldnt trace that tread, thats wy opened a new one.
My problem is that i need to remove the space(trailing ones) oly in the second column. It migthe have more than one space in some instances.
i used the nawk but it removes oly the first space.

Can you please help me.