hi,
i just want to test if a value say $VAR is present in a list
so i have a list like
LIST='A,B,C,D,E'
and now i get VAR filled in from somewhere and want to check if it is in the LIST...the items are delimited by ',' here
i may need to do a switch case sort of depending on whether VAR is in LIST or not.... so my imaginary construct wud go like
if [ $VAR in $LIST ] then
echo '$VAR present in the list'
fi
now someone please help me get the correct shell conctructs for it.
bye