I have a use case where few variables are defined as
test1="12 33 44 55"
test2="45 55 43 22"
test3="66 54 33 45"
i=1;
while [ $i -le 3 ]; do
#parse value of test1 test2 test3
startProcess $test$i
i=$((i+1))
done
startProcess () {
#Should print the complete string which is "12 33 44 55" everytime
echo $1
}
I need to pass the test1, test2, test3 variable values in loop and echo them completely in the function.
Please suggest