Possible Duplicate:
Bash: check if an array contains a value
i have list like
list = ['pic1','pic2','pic3'];
i am in array like
for a in /dir/star
if(a is in list then skip the loop)
do
echo "hello";
done
I want to skip the loop if element is in list
list = ['pic1','pic2','pic3'];notation is not an assignment in bash; it is an invocation of the commandlistwith two arguments, one of which is an equals sign and the other of which is "[pic1,pic2,pic3]" when the command sees it.