bug-bash
[Top][All Lists]
Advanced

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

Re: unset does not act as expected on namerefs


From: Chet Ramey
Subject: Re: unset does not act as expected on namerefs
Date: Wed, 27 May 2015 10:22:41 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 5/26/15 10:31 AM, Shawn Wilson wrote:
> address@hidden:~/temp$ bash --version
> GNU bash, version 4.3.11(1)-release (x86_64-pc-linux-gnu)
> address@hidden:~/temp$ cat t.txt 
> $ome text !n a file|
> address@hidden:~/temp$ unset t
> address@hidden:~/temp$ t=$(< ./t.txt)
> address@hidden:~/temp$ echo "$t"
> bash: $ome text !n a file|: invalid variable name for name reference

This is pretty obviously not the entire story, since you've never assigned
`t' the nameref attribute.  If you run `declare -n t' after the unset,
you'll see that error, but your transcript doesn't show you doing that.

If you can show me a complete transcript I can tell you what's happening.
It may be that you've discovered a bug, but it's hard to say.

Chet

- -- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iEYEARECAAYFAlVl0ygACgkQu1hp8GTqdKspagCfXwqF2uqmwtMhs2vKHevGSJu2
1EAAn01FXqjv+RpKlilPQn7TxJRg1dMt
=PQ5D
-----END PGP SIGNATURE-----



reply via email to

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