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
Single quotes are very strong. Once inside, there's nothing you can do to invoke variable substitution, until you leave. Use double quotes instead:
echo $LINE | sed -e "s/12345678/$replace/g"