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: Greg Wooledge
Subject: Re: /dev/fd/63: line 21: ((: takes && kwsi += takes : attempted assignment to non-variable (error token is "+= takes ")
Date: Wed, 9 Feb 2022 14:37:10 -0500

On Wed, Feb 09, 2022 at 08:20:29PM +0100, Alex fxmbsw7 Ratchev wrote:
> bash-5.1# declare -A KWS ; code='echo foo' . ./+kw test ; . ./kws test
> bash: ((: takes && kwsi += takes : attempted assignment to
> non-variable (error token is "+= takes ")

It would be *so* much simpler if you could take the time and effort to
construct a minimal reproducing example.  One that people could simply
run, without having to jump through *hoops*, to check your results.

unicorn:~$ bash-5.1
unicorn:~$ takes=
unicorn:~$ kwsi=42
unicorn:~$ (( takes && kwsi += takes ))
bash-5.1: ((: takes && kwsi += takes : attempted assignment to non-variable 
(error token is "+= takes ")

There.  Was that TRULY so difficult that you could not do it yourself?



reply via email to

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