I have to read a string from pipe, and I am using
read -a line
for that.
And then I need to calculate two numbers from the string (the string contains numbers at this point exactly at the places I need).
And then I am trying to write this:
number= 10*${line[4]} + ${line[5]}
and getting these errors from bash:
local: `10*1': not a valid identifier
local: `+': not a valid identifier
How to write it correctly that those string fields will be converted to numbers ("50" to 50 etc.) and participate in expression?