From 3c6b85f069758422032d99fdc731122e3fff9b17 Mon Sep 17 00:00:00 2001 From: pvincent Date: Mon, 6 Jun 2022 11:41:39 +0400 Subject: [PATCH] printf --- 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 cc41a73..7772383 100755 --- a/tools/append_or_replace +++ b/tools/append_or_replace @@ -14,7 +14,7 @@ STRING=$2 FILE=$3 if ! grep -Pq "$REGEX" "$FILE"; then - printf "$STRING\n" >>$FILE + printf "%s\n" "$STRING" >>$FILE echo appended else sed -i "s|$REGEX|$STRING|g" $FILE