i am trying to get value of variable by given string: Running this code on Jenkins and its get "bad substitution" in regular shell it works. example:
param1="hello"
param2="world"
PARAMS="param1 param2"
for p in $PARAMS;do
echo ${!p}" "
done
what the best way to make it work in Jenkins too.