bug-bash
[Top][All Lists]
Advanced

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

Re: @Q breaks set -o nounset


From: Chet Ramey
Subject: Re: @Q breaks set -o nounset
Date: Mon, 4 Mar 2019 15:15:23 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.5.1

On 3/3/19 11:53 AM, Martin Schulte wrote:
> Hello,
> 
> with "GNU bash, version 4.4.12(1)-release (x86_64-pc-linux-gnu)" I get
> the following behaviour:
> 
> + bash -c 'set -o nounset; echo $x'
> bash: x: unbound variable
> + bash -c 'set -o nounset; echo ${x}'
> bash: x: unbound variable
> + bash -c 'set -o nounset; echo ${x@Q}'
> 
> + bash -c 'set -o nounset; echo ${x/a/b}'
> bash: x: unbound variable
> 
> "GNU bash, version 5.0.0(1)-release (x86_64-pc-linux-gnu)" behaves
> identically.
> 
> So, @Q breaks the 'set -o nounset'.
> 
> Is this intended?

It's probably an oversight. I'll look into it. Thanks for the report.

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