By XCU 2.9.2 Exit Status, the ! is right associative and all shells should
return 1 for "! break" in any context that permits a pipeline; even if the pipe
only has one element and no "|" involved. I don't see that there's any
ambiguity; while special, break is still considered a command, not a
2018-08-14 12:02:58 +0700, Robert Elz:
[...]
> I know this is of little practical relevance -- no-one sane is
> going to write "! break" (it looks as if it is intended to mean
> "don't break" but that is definitely not correct) but this kind
> of little quirk, and working out how the standard
Hi, the spec for the "allexport" (set -a) shell option says:
POSIX2018> When this option is on, the export attribute shall
POSIX2018> be set for each variable to which an assignment is
POSIX2018> performed; see XBD Variable Assignment. If the
POSIX2018> assignment precedes a utility name in a
Robert Elz wrote:
> What should be printed from
>
> while :
> do
> ! break
> done
> echo $?
>
> The standard does not seem to be clear (unless there is
> already a bug report that has altered things).
>
> Here it is again on one line, so you can cut
> it
Date:Tue, 14 Aug 2018 12:30:22 +0200
From:Joerg Schilling
Message-ID: <5b72af3e.ws0hf/j4O/wuiekr%joerg.schill...@fokus.fraunhofer.de>
| break is a command that has an exit code that is the previous saved exit
code
No, it isn't, its exit status is 0, it says so
2018-08-14 03:45:29 -0400, Shware Systems:
> By XCU 2.9.2 Exit Status, the ! is right associative and all
> shells should return 1 for "! break" in any context that
> permits a pipeline; even if the pipe only has one element and
> no "|" involved. I don't see that there's any ambiguity; while
>
Date:Tue, 14 Aug 2018 09:49:00 +0100
From:Stephane Chazelas
Message-ID: <20180814084900.2zi6l43unfljn...@chaz.gmail.com>
| but ash-based shells and zsh return with 1 for "return".
As does yash (not ash based) but the FreeBSD shell has
been altered (as it was for !
Date:Tue, 14 Aug 2018 03:45:29 -0400
From:Shware Systems
Message-ID: <16537659333-1e9a-4...@webjas-vac152.srv.aolmail.net>
| By XCU 2.9.2 Exit Status, the ! is right associative
I don't know where that comes from, I see no mention of
associativity at all - and
Date:Wed, 15 Aug 2018 05:42:46 +0700
From:Robert Elz
Message-ID: <29705.1534286...@jinx.noi.kre.to>
| LINENO is "magic": in that is isnn't really assigned as a variable, rather
the
[...]
| to those (PWD and the others, like RANDOM) so -a is irrelevant.
Oops, I
Stephane CHAZELAS wrote:
> 2018-08-14 13:49:06 +0200, Joerg Schilling:
> [...]
> > posh is derved from ash and it is a fun as it requires glibc specific bugs
> > in order to work.
> [...]
>
> No, posh is based on pdksh like mksh or OpenBSD sh.
You are right, sorry - it seems that I forgot
2018-08-14 13:49:06 +0200, Joerg Schilling:
[...]
> posh is derved from ash and it is a fun as it requires glibc specific bugs
> in order to work.
[...]
No, posh is based on pdksh like mksh or OpenBSD sh.
--
Stephane
Date:Tue, 14 Aug 2018 17:58:36 +0700
From:Robert Elz
Message-ID: <19691.1534244...@jinx.noi.kre.to>
| heritage whatever, mksh derives (I believe) from pdksh (way
| back) which was a ksh88 clone (of a kind).
| dash comes from ash which was a bourne shell clone
Robert Elz wrote:
> Date:Tue, 14 Aug 2018 12:30:22 +0200
> From:Joerg Schilling
> Message-ID:
> <5b72af3e.ws0hf/j4O/wuiekr%joerg.schill...@fokus.fraunhofer.de>
>
> | break is a command that has an exit code that is the previous saved exit
> code
>
> No, it
13 matches
Mail list logo