|
From: | |
Subject: | Re: is it normal that set -x unset commands dont display special chars in the content |
Date: | Sun, 28 Feb 2021 22:32:13 +0000 |
User-agent: | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 |
On 28/02/2021 22:13, Chet Ramey wrote:
On 2/27/21 6:14 AM, Alex fxmbsw7 Ratchev wrote:but they get unset right, just doesnt display em i have stuff with $'\34' separator and in set -x output the text is just flat for the unset + unset 'dat[kwmetest]' 'dat[1kw1]' 'dat[1take]' 'dat[1code]' code includes minuskws_p1=$nspace$SUBSEP$minuskws_id$SUBSEP \ minuskws_p2=$nspace${SUBSEP}kw$SUBSEPThese code fragments have nothing to do with each other. Why not include a self-contained example that includes relevant `stuff' in what you're passing to `unset'?
Why not indeed. However, I think that I'm able to decipher this. $ declare -A map; key=$'foo\34bar'; map[$key]= $ set -x $ : "$key" + : $'foo\034bar' $ unset "map[$key]" + unset 'map[foobar]'For the unset command, xtrace elects to emit the (non-printable) FS character verbatim rather than employ the ANSI-style notation. Presumably, this led to the conclusion that bash doesn't "display em".
-- Kerin Millar
[Prev in Thread] | Current Thread | [Next in Thread] |