Got it. Thanks. :)

On Wed, Dec 23, 2020 at 10:19 AM Chet Ramey <chet.ra...@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    c...@case.edu    http://tiswww.cwru.edu/~chet/
>

Reply via email to