help-bash
[Top][All Lists]
Advanced

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

Re: /dev/fd/63: line 21: ((: takes && kwsi += takes : attempted assignme


From: Alex fxmbsw7 Ratchev
Subject: Re: /dev/fd/63: line 21: ((: takes && kwsi += takes : attempted assignment to non-variable (error token is "+= takes ")
Date: Wed, 9 Feb 2022 20:09:46 +0100

well i can paste the original code lines here too but i dunno
its part of bigger sw, this code piece is not this i mean its its
singular file and acts as 'kws' function to resolve keywords

declare -a kws=( '' "$@" )
declare kwsi= kw id code takes _t

while [[ -v kws[++kwsi] ]] && kw=${kws[kwsi]} _t=$kwns$_S_
id=${KWS[$_t$_S_$kw]} code=${KWS[$_t$id]} takes=${KWS[$_t$id$_S_]} ;
do
 [[ $code ]] && kwseval "$code" "${kws[@]:kwsi:takes}"
 (( takes && kwsi += takes ))
done

On Wed, Feb 9, 2022 at 8:02 PM Alex fxmbsw7 Ratchev <fxmbsw7@gmail.com> wrote:
>
> i try, and in this it isplays me this
>
> short -x lines
>
> +++ declare kwsi= kw id code takes _t
> +++ takes=
> +++ ((  takes && kwsi += takes  ))
> /dev/fd/63: line 21: ((: takes && kwsi += takes : attempted assignment
> to non-variable (error token is "+= takes ")
>
> i dunno ? any help ?
>
> i notice a space more between (( and takes
> also takes is = [0] so += doesnt run, and in declare before kwsi is
> even declared
>
> help ?



reply via email to

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