Replacement of Delimiter

Dear all,
i have a proble.
in my input file i have records with delimiter like

aa-------bb------cc--vghjav---ef----kjd
dj--------ih------yy--ujdjkkl---dd----jid

now i want to replace the delimiter "-" with "~"
i have used a command i.e
cat FILENAME | tr "-" "~" >> Newfile

this command replacing the input delimiter one by one like

aa~bbccvghjav~efkjd
dj
~ihyyujdjkkl~dd~~~~jid

but the output i want is

aa~bb~cc~vghjav~ef~kjd
dj~ih~yy~ujdjkkl~dd~jid

like this

can any one please help me out regarding this problem?

Regards,
Pankaj

sed 's/--*/~/g' FILENAME > NewFile

Jean-Pierre.

awk '{gsub("-+","~");print}' file    > newfile

Hi.

       -s, --squeeze-repeats
              replace each input sequence of  a  repeated  character  that  is
              listed in SET1 with a single occurrence of that character

-- excerpt from man tr

cheers, drl