I am using the below code for replacing a string inside a shell script.
echo $LINE | sed -e \'s/12345678/\"$replace\"/g\'
but it\'s getting
echo $LINE | sed -e 's/12345678/'$replace'/g'
you can still use single quotes, but you have to "open" them when you want the variable expanded at the right place. otherwise the string is taken "literally" (as @paxdiablo correctly stated, his answer is correct as well)