Browse Source

fix append_or_replace

main
pvincent 10 months ago
parent
commit
057cdd4153
  1. 2
      tools/append_or_replace

2
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"

Loading…
Cancel
Save