Browse Source

printf

master
pvincent 3 years ago
parent
commit
3c6b85f069
  1. 2
      tools/append_or_replace

2
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

Loading…
Cancel
Save