[Top][All Lists]

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

Re: misleading error message from variable modifier

From: Chet Ramey
Subject: Re: misleading error message from variable modifier
Date: Sat, 24 Feb 2018 14:24:21 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.5.2

On 2/23/18 10:20 PM, don fong wrote:
> hi folks.  i'm a bash user, who just noticed a slight anomaly.  it has
> to with the shell variable modifier ${parameter?} .  according to the
> man page, ${X?} should yield an error message and exit if X is unset,
> otherwise the value of X.  in this case,
>     unset X; echo ${X?}
> i expect to get an error message, and indeed an error message results.
>     bash: X: parameter null or not set
> but i think the error message is misleading.  

Thanks for the report and patch. I'll take a look.

``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]