sh doesn't deal correctly with escaped backslashes. The following snippet should put an escape before each end of line but the sh is botching it before it gets to sed. How-To-Repeat: # `sed -e 's/$/ \\\\/g' $change_msg` sed: 1: "s/$/ \/g": unterminated substitute in regular expression It should pass s/$/ \\/g to sed but it doesn't.
State Changed From-To: open->closed A fix has been applied.