I'm developing a shell system that has a form for adding some fields.
Product Quantity Unit Value etc ...
I need every time I loop the loop to change a variable, so I call it on the form!
In case it is prev, every round it switches to prev1, in the other prevdois switch to prevdois1, there in the other round, prev2, prevdois2 and so on, this is because I'm going to call these variables to save to a form. any help?
while [ "$sair" != "sair" ]; do
i=$((i+1))
for filter in Produto Quantidade Descricao PrecoUnitario PrecoTotal; do
read -p "${filter}: " ${filter}$i
**prev=$Produto
prevdois=$Quantidade**
done
read -p "Deseja sair? [sair] ou enter para continuar: " sair
done