aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2024-12-21 16:58:15 -0300
committerEuAndreh <eu@euandre.org>2024-12-21 16:58:15 -0300
commit6e4f30c79ad8e6fd9307759f47f34e088351b382 (patch)
treebfefcf6be7ab8ded60f52930a6f98e812e972c5d
parentComment out broken packages (diff)
downloaddotfiles-6e4f30c79ad8e6fd9307759f47f34e088351b382.tar.gz
dotfiles-6e4f30c79ad8e6fd9307759f47f34e088351b382.tar.xz
bin/re: Use extended regexes in sed(1)
-rwxr-xr-xbin/re4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/re b/bin/re
index 774c02c..6c4c257 100755
--- a/bin/re
+++ b/bin/re
@@ -79,11 +79,11 @@ shift
replace() {
FILE="$1"
# shellcheck disable=2094
- if ! sed "$REGEXP" < "$FILE" | cmp -s - "$FILE"; then
+ if ! sed -E "$REGEXP" < "$FILE" | cmp -s - "$FILE"; then
if [ ! -e "$FILE" ]; then
return 1
fi
- sed "$REGEXP" < "$FILE" | sponge "$FILE"
+ sed -E "$REGEXP" < "$FILE" | sponge "$FILE"
fi
}