From b28150a287aefc11344dacb0e684b5e176f63185 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maja=20K=C4=85dzio=C5=82ka?= Date: Sun, 28 Jan 2024 01:19:39 +0100 Subject: [PATCH] replace.sh: replace all occurences Without the /g flag, only the first occurence on each line will get replaced. --- replace.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/replace.sh b/replace.sh index f4f4185f2b..08a4533c43 100755 --- a/replace.sh +++ b/replace.sh @@ -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")