|
From: | Grisha Levit |
Subject: | Re: {ref}<&- does not work on array reference subscripts |
Date: | Wed, 1 Jun 2016 18:44:30 -0400 |
Yikes, I missed the exec
command in my example, that would certainly make it confusing..
What I meant was that the assignment works (i.e. the nameref is followed correctly), but the relevant code doesn’t handle retrieving the value of such a nameref when it needs to do so to close the descriptor:
$ declare -n ref=var[0]
$ exec {ref}</dev/null
$ declare -p var
declare -a var=([0]="10")
$ exec {ref}<&-
bash: ref: ambiguous redirect
[Prev in Thread] | Current Thread | [Next in Thread] |