[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Send diagnostics to stderr instead of stdout
From: |
Dmitry V. Levin |
Subject: |
[PATCH] Send diagnostics to stderr instead of stdout |
Date: |
Tue, 2 Feb 2010 00:40:41 +0300 |
* zforce.in: In case of usage error, output short error diagnostics to
stderr instead of printing help text to stdout.
* zmore.in: Likewise.
* znew.in: Likewise.
---
zforce.in | 2 +-
zmore.in | 2 +-
znew.in | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/zforce.in b/zforce.in
index b9e057d..fdce8b6 100644
--- a/zforce.in
+++ b/zforce.in
@@ -44,7 +44,7 @@ not compress them twice.
Report bugs to <address@hidden>."
if test $# = 0; then
- echo "$usage"
+ echo >&2 "$0: invalid number of operands; try \`$0 --help' for help"
exit 1
fi
diff --git a/zmore.in b/zmore.in
index 64b144d..0f048c9 100644
--- a/zmore.in
+++ b/zmore.in
@@ -57,7 +57,7 @@ fi
if test $# = 0; then
if test -t 0; then
- echo "$usage"
+ echo >&2 "$0: invalid number of operands; try \`$0 --help' for help"
else
gzip -cdfq | eval ${PAGER-more}
fi
diff --git a/znew.in b/znew.in
index c7cdfc8..1ae466c 100644
--- a/znew.in
+++ b/znew.in
@@ -97,7 +97,7 @@ do
done
if test $# -eq 0; then
- echo "$usage"
+ echo >&2 "$0: invalid number of operands; try \`$0 --help' for help"
exit 1
fi
--
ldv
- [PATCH] Send diagnostics to stderr instead of stdout,
Dmitry V. Levin <=