bug-bash
[Top][All Lists]
Advanced

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

Re: inconsistent readonly error behavior


From: Travis Everett
Subject: Re: inconsistent readonly error behavior
Date: Wed, 23 Dec 2020 10:40:13 -0600

Got it. Thanks. :)

On Wed, Dec 23, 2020 at 10:19 AM Chet Ramey <chet.ramey@case.edu> wrote:

> On 12/23/20 11:10 AM, Travis Everett wrote:
> > I think I'm missing or misreading something. If I understood, the
> > assignment and expansion errors are both shell errors that should have
> the
> > same exit behavior?
> >
> > But I see the assignment error ending the list and returning to the top
> > level, and the expansion exiting the script:
>
> That's not an expansion error.
>
>
> > if true; then
> > echo ${bad:?word}
> > echo reached3
> > fi
> > echo reached4
>
> This is a well-defined expansion whose behavior is to exit a
> non-interactive shell if `bad' is unset or null.
>
> --
> ``The lyf so short, the craft so long to lerne.'' - Chaucer
>                  ``Ars longa, vita brevis'' - Hippocrates
> Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/
>


reply via email to

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