Re: If the variable has its 'integer' attribute set,

2021-11-21 Thread Greg Wooledge
On Sun, Nov 21, 2021 at 07:18:09PM +, Darac Marjal wrote: > You probably already know that if you write: > > i = 65 > > then several things happen: Only one thing happens: bash tries to run the command named "i" and you will almost certainly get an error message saying "command not found".

Re: If the variable has its 'integer' attribute set,

2021-11-21 Thread Darac Marjal
.  All > VALUEs undergo tilde expansion, parameter and variable expansion, > command substitution, arithmetic expansion, and quote removal > (detailed below).  If the variable has its 'integer' attribute set, > then VALUE is evaluated as an arithmetic expression even if the > '$((...))' ex

Re: If the variable has its 'integer' attribute set,

2021-11-20 Thread Greg Wooledge
On Sun, Nov 21, 2021 at 01:37:14AM +, sim sim wrote: > I do not understand  "If the variable has its 'integer' attribute set," where > the variable has an 'integer' attribute, after all, this is not a function? They're talking about "declare -i". Which is really

If the variable has its 'integer' attribute set,

2021-11-20 Thread sim sim
, arithmetic expansion, and quote removal (detailed below).  If the variable has its 'integer' attribute set, then VALUE is evaluated as an arithmetic expression even if the '$((...))' expansion is not used.   . .. I do not understand  "If the variable has its 'integer' attribute set,&q