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

If the variable has its 'integer' attribute set,



Hi, all.
My question may be in the wrong place but I'm already exhausted. Started reading https://www.gnu.org/software/bash/manual/bash.pdf.

3.4 Shell Parameters
.........
....
A parameter is set if it has been assigned a value.  The null string is a valid value.  Once a variable is set, it may be unset only by using the 'unset' builtin command.
   A variable may be assigned to by a statement of the form
     NAME=[VALUE]
If VALUE is not given, the variable is assigned the null string.  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 '$((...))' expansion is not used.  
.............
......
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?
I do not ask to explain in detail, because it is long and I will not understand because of my poor English, but if you can just write a simple variable for:
 name=[value]
where "If the variable has its 'integer' attribute set",
for example it will help a lot. This manual is difficult for a beginner to read. The same concept in different places denotes: either an attribute or a parameter or an option.
And advise a smart forum on this topic, where you can ask questions, Google found trash.
Thanks,
Sim.

Reply to: