From 9d2d25dfa427470e292a6b3710267b8038f9f49a Mon Sep 17 00:00:00 2001 From: Bo Huang Date: Fri, 13 Apr 2018 15:03:20 -0700 Subject: [PATCH] Fix escaping in sumo source file templating --- run.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/run.sh b/run.sh index 15535d8..6914229 100755 --- a/run.sh +++ b/run.sh @@ -49,9 +49,9 @@ generate_user_properties_file() { OLD_IFS=$IFS IFS=$'\n' - while read line; do - line_escape_backslashes=${line//\\/\\\\\\\\} - echo $(eval echo "\"${line_escape_backslashes//\"/\\\"}\"") >> ${to} + while read -r line; do + line_escape_backslashes=${line//\\/\\\\} + printf "%s\n" "$(eval echo "\"${line_escape_backslashes//\"/\\\"}\"")" >> ${to} done <${from} IFS=${OLD_IFS}