How can I update a variable which has inside a variable and keep it global?
I know I can do this to update a variable but which isn't global:
for i in {1..24}; do
query=query_$i
echo $query
done
I want to do something like this:
query=query_$i
for i in {1..24}; do
echo $query
done
The variable doesn't update.