I have a bunch of variables that I want to check, and if they contain the value "None" then I want to empty them.
var1=(check for some value, sometimes it returns "none")
var2=(check for some value, sometimes it returns "none")
var3=(check for some value, sometimes it returns "none")
someBizzareName=(check for some value, sometimes it returns "none")
if [[ "${var1}" == "None" ]] ; then
var1=""
fi
if [[ "${var2}" == "None" ]] ; then
var2=""
fi
And this is all working fine and dandy, only since I have a lot of varN, I will end up with a ton of if [[ "${varN}" == "None" ]]
and I have to know their names ; so I was wondering, since it's in BASH very nature to search and match everything, if there is a wild-card for variables, inside a for loop, that will match all vars, something like ${*}
(I tried that, does'nt work) ? I have done all kinds of searches but always find something about matching variable content, not the var itself..?