Your message dated Sat, 10 Dec 2005 16:13:03 +0100
with message-id <[EMAIL PROTECTED]>
and subject line fixed in bash_3.1-1
has caused the attached Bug report to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere. Please contact me immediately.)
Debian bug tracking system administrator
(administrator, Debian Bugs database)
--------------------------------------
Received: (at submit) by bugs.debian.org; 20 Feb 2005 10:03:31 +0000
>From [EMAIL PROTECTED] Sun Feb 20 02:03:30 2005
Return-path: <[EMAIL PROTECTED]>
Received: from mx05.gis.net [208.218.130.13]
by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
id 1D2nw1-0007Ov-00; Sun, 20 Feb 2005 02:03:29 -0800
Received: from arf ([207.7.197.241]) by mx05.gis.net; Sun, 20 Feb 2005 05:03:25
-0500
Received: from alfie by Arf with local (Exim 3.36 #1 (Debian))
id 1D2nvy-0003T2-00; Sun, 20 Feb 2005 05:03:26 -0500
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
From: A Costa <[EMAIL PROTECTED]>
To: Debian Bug Tracking System <[EMAIL PROTECTED]>
Subject: bash: 'help if': confusing text
X-Mailer: reportbug 3.8
Date: Sun, 20 Feb 2005 05:03:26 -0500
Message-Id: <[EMAIL PROTECTED]>
Sender: A Costa <[EMAIL PROTECTED]>
X-Rcpt-To: <[EMAIL PROTECTED]>
X-BadReturnPath: [EMAIL PROTECTED] rewritten as [EMAIL PROTECTED]
using "From" header
Delivered-To: [EMAIL PROTECTED]
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02
(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-8.0 required=4.0 tests=BAYES_00,HAS_PACKAGE
autolearn=no version=2.60-bugs.debian.org_2005_01_02
X-Spam-Level:
Package: bash
Version: 3.0-14
Severity: normal
% help if | cat -n
1 if: if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [
else COMMANDS; ] fi
2 The if COMMANDS are executed. If the exit status is zero, then the
then
3 COMMANDS are executed. Otherwise, each of the elif COMMANDS are
executed
4 in turn, and if the exit status is zero, the corresponding then
COMMANDS
5 are executed and the if command completes. Otherwise, the else
COMMANDS
6 are executed, if present. The exit status is the exit status of
the last
7 command executed, or zero if no condition tested true.
The clause in line #7 about "zero if no condition tested true" is
confusing, because it's not made sufficiently clear which exit status it
means -- one of the COMMANDS or the 'if..fi' as a whole. Also, there's
plural trouble: line #1's "if COMMANDS" is singular, (in that
particular context), so the verb "are" should be "is"; plural verbs are
overused throughout.
How I first misread #7: hmmm, "no X is true" implies that
"any X is false". But the exit status of a false test is never zero.
Example:
% if [ 1 = 1 ] ; then echo true:$? ; else echo false:$? ; fi
true:0
% if [ 1 = 3 ] ; then echo true:$? ; else echo false:$? ; fi
false:1 # "no condition tested true"??
Yet line #7 IS mainly correct, because it's refering to the exit status of
'fi':
% if [ x = y ] ; then echo true:$? ; fi ; echo $?
0
Suggested revision with numbers, quoting, a pronoun, and stricter
plurals, first draft:
if: if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else
COMMANDS; ] fi
The "if COMMANDS" is executed and returns an exit status of 0 or 1. If
0, "then COMMANDS" is executed. If 1, any "elif COMMANDS" are executed
in turn; if one of those returns 0, its corresponding "then COMMANDS"
is executed and the "if" command completes. Otherwise "else COMMANDS"
is executed, if present. The exit status of "fi" is that of the last
command executed, or 0 if no condition tested true.
Still reads harshly, what with six usages of "executed"; and the
singulars are grating -- but accurate. Maybe it'd look better without
those numbers, and the last sentence rephrased:
The "if COMMANDS" is executed and returns an exit status. If 'true',
"then COMMANDS" is executed. If 'false', any "elif COMMANDS" are
executed in turn; if one of those returns 'true', its corresponding
"then COMMANDS" is executed and the "if" command completes. Otherwise
"else COMMANDS" is executed, if present. The exit status of "fi" is
'true' if no condition tested 'true', or else that of the last
command executed after a 'then' or an 'else'.
Hope this does not induce headaches, (other than my own)...
-- System Information:
Debian Release: 3.1
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.9-1-686
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) (ignored: LC_ALL set to C)
Versions of packages bash depends on:
ii base-files 3.1.2 Debian base system miscellaneous f
ii libc6 2.3.2.ds1-20 GNU C Library: Shared libraries an
ii libncurses5 5.4-4 Shared libraries for terminal hand
ii passwd 1:4.0.3-30.10 change and administer password and
-- no debconf information
---------------------------------------
Received: (at 296099-done) by bugs.debian.org; 10 Dec 2005 15:13:10 +0000
>From [EMAIL PROTECTED] Sat Dec 10 07:13:10 2005
Return-path: <[EMAIL PROTECTED]>
Received: from mail.cs.tu-berlin.de ([130.149.17.13] ident=root)
by spohr.debian.org with esmtp (Exim 4.50)
id 1El6PO-0006xq-DD; Sat, 10 Dec 2005 07:13:10 -0800
Received: from mailhost.cs.tu-berlin.de ([EMAIL PROTECTED] [130.149.17.13])
by mail.cs.tu-berlin.de (8.9.3p2/8.9.3) with ESMTP id QAA29419;
Sat, 10 Dec 2005 16:13:07 +0100 (MET)
Received: from localhost (localhost [127.0.0.1])
by mailhost.cs.tu-berlin.de (Postfix) with ESMTP id CE2B9F2BC;
Sat, 10 Dec 2005 16:13:06 +0100 (MET)
Received: from mailhost.cs.tu-berlin.de ([127.0.0.1])
by localhost (bueno [127.0.0.1]) (amavisd-new, port 10224) with ESMTP
id 05269-22; Sat, 10 Dec 2005 16:13:03 +0100 (MET) 11217
Received: from bolero.cs.tu-berlin.de (bolero.cs.tu-berlin.de [130.149.19.1])
by mailhost.cs.tu-berlin.de (Postfix) with ESMTP;
Sat, 10 Dec 2005 16:13:03 +0100 (MET)
Received: (from [EMAIL PROTECTED])
by bolero.cs.tu-berlin.de (8.12.10+Sun/8.12.8/Submit) id jBAFD3Vk016187;
Sat, 10 Dec 2005 16:13:03 +0100 (MET)
From: Matthias Klose <[EMAIL PROTECTED]>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <[EMAIL PROTECTED]>
Date: Sat, 10 Dec 2005 16:13:03 +0100
To: [EMAIL PROTECTED], [EMAIL PROTECTED],
[EMAIL PROTECTED], [EMAIL PROTECTED]
Subject: fixed in bash_3.1-1
X-Mailer: VM 7.17 under 21.4 (patch 17) "Jumbo Shrimp" XEmacs Lucid
X-Virus-Scanned: by amavisd-new at cs.tu-berlin.de
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02
(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Level:
X-Spam-Status: No, hits=-3.0 required=4.0 tests=BAYES_00 autolearn=no
version=2.60-bugs.debian.org_2005_01_02
X-CrossAssassin-Score: 2
Version: 3.1-1
fixed in bash-3.1
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]