replace word with special charaters

I have input file called file1 with characters that have \\ in it.
I cannot change input file, because it is generated earlier in script.
Now would like to replace string on line in file called bfile with output from file1
I have been using sed command.

$cat file1
pc//6sPxp==
$ cat scr1
#!/bin/ksh
BC=`cat file1`
sed -e "s/State/$BC/g" bfile
$ ./scr1
sed: command garbled: s/State/pc//6sPxp==/g

Ok
Will do this next post, sorry.

You should use another character as a delimiter in sed command:

sed -e "s%State%$BC%g" bfile

instead of:

sed -e "s/State/$BC/g" bfile

for example... You may choose a character that is not in the file whose contents is to be changed, though; in fact, this is the explanation of the error message that you include in your request.

Yes, that worked!
Thank you hexram!
I thought I was going to have to write a sub routine to analyze file1 character by character.
I not sure what other delimiter I could use? Ok read man page. "Any character other than backslash or newline can be used instead of a slash to delimit the RE and the replacement."
I will change code to look at output from generated file1 and make changes to sed command, if file1 has /, %, $, etc.... in it.

you want to change your log file content "\\" to some special character or any characters,
you can try this by using the following example code;

sed -e "s/[\]/-/g"