NUM[1]=1 NUM[2]=0 NUM[3]=1 for x in 1 2 3; do case in ${NUM[$x]} 1) blah