From 803881998fed3b34a0f219bd28a03d247183c204 Mon Sep 17 00:00:00 2001 From: Ingo Karkat Date: Sat, 21 Jan 2023 18:59:32 +0100 Subject: [PATCH] FIX: Use standard error for die() and dieWithHelp() By convention, error output should be printed to standard error, not standard out. Same for the usage help that may accompany the error message. --- todo.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/todo.sh b/todo.sh index fb8d4bc..49d1655 100755 --- a/todo.sh +++ b/todo.sh @@ -349,14 +349,14 @@ dieWithHelp() case "$1" in help) help;; shorthelp) shorthelp;; - esac + esac >&2 shift die "$@" } die() { - echo "$*" + echo >&2 "$*" exit 1 }