sed command not running

I am using solrais 10 on sun sparc.

The following command executes successfully

echo c:/test.txt | sed -e 's/\//\\\//g'

But when i executes the following command

x=`echo c:/test.txt | sed -e 's/\//\\\//g'`

I get the following error

sed: command garbled: s/\//\\//g

Is there any way to avoid this error. I am using the Bash shell.

one way:

#  x=`echo c:/test.txt | sed -e 's/\\//\\\\\//g'`

#  echo $x
c:\/test.txt

what is it that you're trying to achieve?

Thanks all of you for helping me.

>what is it that you're trying to achieve?

Actually, i am to pass the output of this command to SED to replace a variable PATH with the output of this command.