From: Eric Blake <eblake@redhat.com>
To: Malcolm Kay <malcolm.kay@internode.on.net>
Cc: dash@vger.kernel.org
Subject: Re: if then elif then else fi -- Problem report
Date: Mon, 28 Jun 2010 07:22:02 -0600 [thread overview]
Message-ID: <4C28A1FA.1090306@redhat.com> (raw)
In-Reply-To: <201006282226.22001.malcolm.kay@internode.on.net>
[-- Attachment #1: Type: text/plain, Size: 1081 bytes --]
On 06/28/2010 06:56 AM, Malcolm Kay wrote:
> Should I create a problem report? Where should I send it?
You just did.
> The problem is that 'dash' bombs out with an empty list in:
>
> if ...
> then
> list
> elif ...
> then
> list
> fi
>
> or in:
>
> if ...
> then
> list
> else
> list
> fi
POSIX requires a non-empty list in these syntax setups.
> The latter gives for example:
> Syntax error: "else" unexpected.
Correct.
> Yet the man pages clearly state that a list consists of zero
> or more commands --
> <quote>
> Lists -- Generally Speaking
> A list is a sequence of zero or more commands separated by
> newlines,
Therefore, the bug is in the man page. Per POSIX,
http://www.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_09_03
"A list is a sequence of one or more AND-OR lists separated by the
operators ';' and '&' and optionally terminated by ';' , '&' , or
<newline>."
--
Eric Blake eblake@redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 619 bytes --]
next prev parent reply other threads:[~2010-06-28 13:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-28 12:56 if then elif then else fi -- Problem report Malcolm Kay
2010-06-28 13:22 ` Eric Blake [this message]
2010-06-29 1:08 ` Malcolm Kay
2010-06-29 12:56 ` Eric Blake
2010-07-04 21:50 ` Sven Mascheck
2010-07-06 7:48 ` Malcolm Kay
2010-07-06 20:49 ` Sven Mascheck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C28A1FA.1090306@redhat.com \
--to=eblake@redhat.com \
--cc=dash@vger.kernel.org \
--cc=malcolm.kay@internode.on.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox