replace.sh: replace all occurences

Without the /g flag, only the first occurence on each line will get
replaced.
This commit is contained in:
Maja Kądziołka 2024-01-28 01:19:39 +01:00
parent 8f8326ca35
commit b28150a287
No known key found for this signature in database

View File

@ -6,4 +6,4 @@ if [ "$1" = "" -o "$2" = "" ]; then
exit 0
fi
sed -i 's/\<'"$1"'\>/'"$2"'/' $(git grep -Ilwr "$1")
sed -i 's/\<'"$1"'\>/'"$2"'/g' $(git grep -Ilwr "$1")