Sed Help

Hi,

I need to replace every occurence of the sting "$($" by "$ $" .

Eg: Wel$($come to U$($nix
should be replaced by Wel$ $come to U$ $nix

i tried sed 's/\$(\$/$ $/g'
but i get the o/p Wel$( to U$(

can anyone help ....

sed 's/\$(\$/\$ \$/g'

Regards

That doesnt work either ....

sed 's/\$(\$/\$ \$/g' gives the o/p Wel$( to U$(

sed 's_\$(\$_\$\ \$_g'

Strange, it works fine for me, this:

echo 'Wel$($come'|sed 's/\$(\$/\$ \$/'

gives me:

Wel$ $come

Regards

Its works fine for

echo 'Wel$($come'|sed 's/\$(\$/\$ \$/'
Wel$ $come

but doesn't work fine for
echo "Wel$($come to U$($nix" |sed 's/\$(\$/\$ \$/'
Wel$( to U$(

Even Anchal's soln does not work....
echo "Wel$($come to U$($nix" | sed 's_\$(\$_\$\ \$_g'
Wel$( to U$(

On my system the result of:

echo 'Wel$($come to U$($nix'|sed 's/\$(\$/\$ \$/g'

is:

Wel$ $come to U$ $nix

Regards

Hey i was going wrong some where else ....

Insted of single quotes i was putting the whole string in the double quotes...

I dont know how does that make so much difference.....

Even Anchal's answer works...
Thanks Buddy !!