and entering the string
to standard input gives the expected result
However, putting the same string into a file and running
sed 's/$/x/' filename
gives the result
Using the sed append command gives the same result. What should the bash/sed commands be to get the desired result when appending characters at end of lines in files containing quotation marks?