Fix Bash implementation interop carriage returns.
authorChris McCormick <chris@mccormick.cx>
Sat, 30 Nov 2019 07:47:02 +0000 (15:47 +0800)
committerChris McCormick <chris@mccormick.cx>
Sat, 30 Nov 2019 07:47:02 +0000 (15:47 +0800)
Before this fix the 'sh*' function was joining the lines of the output of whatever command was run in a way that resulted in '\n' instead of a literal carriage return.

bash/stepA_mal.sh

index f1e63d3..a5feb34 100755 (executable)
@@ -166,7 +166,7 @@ EVAL () {
               local output=""
               local line=""
               while read line; do
-                  output="${output}${line}\n"
+                  output="${output}${line}"$'\n'
               done < <(eval ${ANON["${r}"]})
               _string "${output%\\n}"
               return ;;