From 057cdd41533cdc487e8aea35885e50330295f785 Mon Sep 17 00:00:00 2001 From: pvincent Date: Wed, 13 Mar 2024 13:24:25 +0400 Subject: [PATCH] fix append_or_replace --- tools/append_or_replace | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/append_or_replace b/tools/append_or_replace index a9dbdac..47d7095 100755 --- a/tools/append_or_replace +++ b/tools/append_or_replace @@ -11,7 +11,7 @@ STRING=$2 FILE=$3 if ! grep -Eq "$REGEX" "$FILE"; then - printf "%s\n" "$STRING" >>"$FILE" + builtin echo -e "$STRING" >>"$FILE" echo 'appended' else sed -Ei "s|$REGEX|$STRING|g" "$FILE"