Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #14783 > unrolled thread

Re: exiting noninteractive shells on 'shift 2'

Started byGrisha Levit <grishalevit@gmail.com>
First post2018-11-08 19:11 -0500
Last post2018-11-08 19:11 -0500
Articles 1 — 1 participant

Back to article view | Back to gnu.bash.bug

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: exiting noninteractive shells on 'shift 2' Grisha Levit <grishalevit@gmail.com> - 2018-11-08 19:11 -0500

#14783 — Re: exiting noninteractive shells on 'shift 2'

FromGrisha Levit <grishalevit@gmail.com>
Date2018-11-08 19:11 -0500
SubjectRe: exiting noninteractive shells on 'shift 2'
Message-ID<mailman.3682.1541722323.1284.bug-bash@gnu.org>
On Thu, Nov 8, 2018, 3:48 PM Eric Blake <eblake@redhat.com> wrote:

>      If the n operand is invalid or is greater than "$#", this may be
> considered a syntax error and a non-interactive shell may exit; if the
> shell does not exit in this case, a non-zero exit status shall be
> returned.


This seems to say that "shift N" *may* be considered an error *in which
case* the rules in 2.8.1 must apply. But since bash does not consider it to
be an error, it behaves as the second half of the sentence proscribes and
returns a non-zero status.

>

[toc] | [standalone]


Back to top | Article view | gnu.bash.bug


csiph-web