DO NOT USE ECHO WHEN SOMETHING MAY CONTAIN A B-A-C-K-S-L-A-S-H

Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
This commit is contained in:
Nico Schottelius 2014-01-21 16:41:34 +01:00
parent 6746ba8279
commit 51c9662475

View file

@ -58,7 +58,7 @@ case "$state_should" in
# Only replace ' with '"'"' and keep \ as they are
line_sanitised=$(cat "$__object/parameter/line" | sed -e "s/'/'\"'\"'/g")
echo "printf '%s\n' '$line_sanitised' >> $file"
printf '%s' "printf '%s\n' '$line_sanitised' >> $file"
;;
absent)