summaryrefslogtreecommitdiffstats
path: root/src/output.sh
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2019-04-14 15:01:37 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2019-04-14 15:01:37 (EDT)
commite896f1bd0de35a4c2893f8d7b68028ae6f1c7d23 (patch)
tree900ba669d4791bd0b22ba5b4e6fcabb0f074c005 /src/output.sh
parent4d4570f81329f3e99cf0ce1b8ed61d5b9cb39026 (diff)
Make redirected FDs explicit
Diffstat (limited to 'src/output.sh')
-rw-r--r--src/output.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/output.sh b/src/output.sh
index 0c5be34..94cc32a 100644
--- a/src/output.sh
+++ b/src/output.sh
@@ -26,8 +26,8 @@ error()
local fmt="${2}"
shift 2
- printf '%s: Error: ' "${0##*/}" >&2
- printf "${fmt}\n" "${@}" >&2
+ printf '%s: Error: ' "${0##*/}" 1>&2
+ printf "${fmt}\n" "${@}" 1>&2
# In a subshell, this will have no effect, so the shell's exit status
# will be 128+SIGINT. Meh.
@@ -40,8 +40,8 @@ warn()
local fmt="${1}"
shift 1
- printf '%s: Warning: ' "${0##*/}" >&2
- printf "${fmt}\n" "${@}" >&2
+ printf '%s: Warning: ' "${0##*/}" 1>&2
+ printf "${fmt}\n" "${@}" 1>&2
return 0
}
@@ -51,8 +51,8 @@ info()
local fmt="${1}"
shift 1
- printf '%s: ' "${0##*/}" >&2
- printf "${fmt}\n" "${@}" >&2
+ printf '%s: ' "${0##*/}" 1>&2
+ printf "${fmt}\n" "${@}" 1>&2
return 0
}