From: Dmitry V. Levin Date: Mon, 1 Feb 2010 21:40:41 +0000 (+0300) Subject: wrapper scripts: write diagnostics to stderr, not to stdout X-Git-Tag: v1.5~108 X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=2bea18bc85c6815e742dd3aa287d8f7aa2f0bb74;p=debian%2Fgzip wrapper scripts: write diagnostics to stderr, not to stdout * 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. --- 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 ." 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 43f3148..78ae253 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