diff options
author | EuAndreh <eu@euandre.org> | 2024-12-21 16:58:15 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2024-12-21 16:58:15 -0300 |
commit | 6e4f30c79ad8e6fd9307759f47f34e088351b382 (patch) | |
tree | bfefcf6be7ab8ded60f52930a6f98e812e972c5d /bin/re | |
parent | Comment out broken packages (diff) | |
download | dotfiles-6e4f30c79ad8e6fd9307759f47f34e088351b382.tar.gz dotfiles-6e4f30c79ad8e6fd9307759f47f34e088351b382.tar.xz |
bin/re: Use extended regexes in sed(1)
Diffstat (limited to 'bin/re')
-rwxr-xr-x | bin/re | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 } |