From 742c1f042ac568ef1f0897486be1e5d577b9f46d Mon Sep 17 00:00:00 2001 From: mivirl <> Date: Sun, 3 Mar 2024 17:57:24 -0600 Subject: [PATCH] server: use printf for writing input to file (for logs, processes) Switched to printf instead of echo to ensure that input lines are copied as-is and escapes are ignored --- src/server.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server.sh b/src/server.sh index 52e785a..7fbd00e 100644 --- a/src/server.sh +++ b/src/server.sh @@ -26,7 +26,7 @@ write_to_file() { touch "$1" while IFS= read -r INPUT; do if [ "$INPUT" != "⟃---EOF---⟄" ]; then - echo "$INPUT" >> "$1" + printf "%s" "$INPUT" >> "$1" else break fi -- 2.39.5