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:17:25 +0100

i found a way you can test without all the stuffs
just two files, +kw to add keyword, and kws to eval keywords
it all used to work i didnt use it for a long time now i get this error

bash --norc --noprofile
bash-5.1# . ./+kw test
bash-5.1# . ./kws test
bash: ((: takes && kwsi += takes : attempted assignment to
non-variable (error token is "+= takes ")


On Wed, Feb 9, 2022 at 8:11 PM Alex fxmbsw7 Ratchev <fxmbsw7@gmail.com> wrote:
>
> if, anyone would wanna try, uhm, uhm its not easy, i mean u can issue
> +kw keyword etc but u wont wanna unpack my softwares tgz so..
>
> On Wed, Feb 9, 2022 at 8:09 PM Alex fxmbsw7 Ratchev <fxmbsw7@gmail.com> wrote:
> >
> > 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 ?

Attachment: +kw
Description: Binary data

Attachment: kws
Description: Binary data


reply via email to

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