text manipulation help

Hello,

How can I replace in a text document a space " " with ":"?

sed 's/ /:/g' myFile
tr ' ' ':' < input > /tmp/$$
# You should check the contents of /tmp/$$ before overwriting 'input' with it
cat /tmp/$$ > input
rm /tmp/$$

Thanks.