[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: exiting noninteractive shells on 'shift 2'

From: Grisha Levit
Subject: Re: exiting noninteractive shells on 'shift 2'
Date: Thu, 8 Nov 2018 19:11:39 -0500

On Thu, Nov 8, 2018, 3:48 PM Eric Blake <address@hidden> 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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]