diff options
author | EuAndreh <eu@euandre.org> | 2024-01-04 11:23:50 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2024-01-04 11:23:55 -0300 |
commit | 07455024c72c3aa0bacf8338b82d3a0b8a96a9b0 (patch) | |
tree | c3e7074928e2783d9e97001f45e2a3522d52ba76 /bin/muffle | |
parent | etc/sh/rc: Fix "c" alias to use the correct command (diff) | |
download | dotfiles-07455024c72c3aa0bacf8338b82d3a0b8a96a9b0.tar.gz dotfiles-07455024c72c3aa0bacf8338b82d3a0b8a96a9b0.tar.xz |
re "s|echo \"\\\$|printf '%s\\\n' \"\$|g"
Replace all cases where `echo` was given a variable as its first
argument, even on cases where we always know what the variable's content
look like.
Diffstat (limited to 'bin/muffle')
-rwxr-xr-x | bin/muffle | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -83,10 +83,10 @@ STATUS="$(cat "$STATUS_F")" if [ "$STATUS" != 0 ]; then cat "$OUT" "$ERR" | sort -k2 | while read -r line; do - if [ "$(echo "$line" | cut -d' ' -f1)" = 'out:' ]; then - echo "$line" | cut -d' ' -f3- >&1 + if [ "$(printf '%s\n' "$line" | cut -d' ' -f1)" = 'out:' ]; then + printf '%s\n' "$line" | cut -d' ' -f3- >&1 else - echo "$line" | cut -d' ' -f3- >&2 + printf '%s\n' "$line" | cut -d' ' -f3- >&2 fi done exit "$STATUS" |