I'm developing a program and I need to create a function that for each "VARIANT$X" that exist, execute the "make_anykernel" function, I'm trying to do it with a variable named VARIANT$X, "X" starts with the value = 1 and each cycle X = X + 1 to check if the next VARIANT has a value and then execute the function again, the problem is that the variable "VV" isn't taking the value of VARIANT$X, is taking literally VARIANT1, VARIANT2, VARIANT3... Here's my code
X=1
bool=true
while [ "$bool" = true ]; do
export VARIANT=VARIANT$X
export DEFCONFIG=DEFECONFIG$X
X=$((X+1))
VARIANT$X=VV
if [ "$VV" = "" ]; then
bool=false
else
make_anykernel
fi
done
Sorry if this is a stupid question or problem, any help will be very grateful, thanks.