bug-bash
[Top][All Lists]
Advanced

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

declare -n next=arr[++elem] == nowork ? [[ -v


From: Alex fxmbsw7 Ratchev
Subject: declare -n next=arr[++elem] == nowork ? [[ -v
Date: Mon, 8 Mar 2021 03:36:02 +0100

[msg(shbot)] # foo() { declare -a foo=( "$@" ) ; declare i=-1 ; declare -p
foo ; declare -n next=foo[++i]
now=foo[i] ; while [[ -v next ]] ; do : $now ; done ; printf -- $i ; } ;
foo '' 1 2 3
[shbot(~shbot@37.139.2.101)] declare -a foo=([0]="" [1]="1" [2]="2" [3]="3")
[shbot(~shbot@37.139.2.101)] -1

any way to make it work ? i think i remember that it used to work at least
once for me ..


reply via email to

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