Browse Source

printf

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

2
tools/append_or_replace

@ -14,7 +14,7 @@ STRING=$2
FILE=$3 FILE=$3
if ! grep -Pq "$REGEX" "$FILE"; then if ! grep -Pq "$REGEX" "$FILE"; then
printf "$STRING\n" >>$FILE
printf "%s\n" "$STRING" >>$FILE
echo appended echo appended
else else
sed -i "s|$REGEX|$STRING|g" $FILE sed -i "s|$REGEX|$STRING|g" $FILE

Loading…
Cancel
Save