What about for the statement that appends data to the end of the file?
sed "$a\\
PR_DbConfigEnd $FILENAME " <$FILENAME >$TMPFILENAME
I get the error message:
sed: command garbled: \
If I remove the second backslash:
sed "$a\
PR_DbConfigEnd $FILENAME " <$FILENAME >$TMPFILENAME
I get this error message:
sed: command garbled: PR_DbConfigEnd test2.txt