add semicolumn and remove spaces

Hi

I have a file like:

one  two         three  four          five
six   seven      eight  nine          ten

and I'd like to get

one:two:three:four:five

I'm trying to do it with sed, but the problem is also that the spaces between the words are not constant.
Any idea please?

thanks

D.

$ sed "s/  */:/g" file1
one:two:three:four:five
six:seven:eight:nine:ten

Try:

sed 's/  */:/g' infile
awk '$1=$1' OFS=: infile
tr -s ' ' ':' < infile

thx a lot for the fast reply
D.

sed 's/\s\+/:/g' < file

i just wanted to ask something here. if i have a file very similar to the given above

one  two      3748901   90  NULL    0   3892031               three  four          five
six   seven      eight  nine          ten

and i want the output in the way as u said earlier. (given below)

one:two:three:four:five

will this one command will work ???

sed 's/\s\+/:/g' < file 

If yes. then my 2nd question..

my file has like 2000 records and each record is given like :-

one  two      3748901   90  NULL    0   3892031               three  four          five
six   seven      eight  nine          ten                                          one  two      3748901   90  NULL    0   3892031               three  four          five
six   seven      eight  nine          ten                              one  two      3748901   90  NULL    0   3892031               three  four          five
six   seven      eight  nine          ten

first record starts from (a random number like 3748901) how will get the desired output in the way like :-

3748901:one:two:three:four:five:9748934
3748901:one:two:three:four:five:9748934
3748901:one:two:three:four:five:9748934

what i am trying to say is there is anther data in my file in each record that is exactly similar to the first record. the only difference between the first record and the between lying data is that.
my 1st record starts with integer value 9 and other one is always something else.

any ideas on this?