How to change the value of value in BASH ??
- by debugger
Hello All,
Let's say i have the Following,
Vegetable=Potato ( Kind of vegetable that i have )
Potato=3 ( quantity available )
If i wanna know how many vegetables i have (from a script where i have access only to variable Vegetable), i do the following:
Quantity=${!Vegetable}
But let's say i take one Potato then i want to update the quantity, i should be able to do the following:
${Vegetable}=$(expr ${!Vegetable} - 1)
It does not work !!
Any clues to realize this
Thanks