There's no problem using an if inside a case statement. It's that your if statements are a wee bit incorrect.
You had your if statement on the same line as your $ESC assignment. Doesn't work outside of a case doesn't work inside. Also, you need to use -o for the or in your if statements, and you need AT LEAST one line to execute if your if statement is true. (I just put an echo as a place holder).
It could be that this particular if statement should be outside of your case. I notice that they're all the same. No need to duplicate code in that case, just put your if after the esac.
By the way: You can do an or inside of an if in either one of these two ways:
if [[ "$PROJN" == "ONE" -o "$PROJN" == "two" ]]
or
if [[ "$PROJN" == "ONE" ]] || [[ "$PROJN" == "two" ]]
And now back your regularly scheduled program...
findinfo() {
OPT1=$1
case "$OPT1" in
linux)
echo "Setting environment"
ESC="hello_linux"
if [[ "$PROJN" == "ONE" -o "$PROJN" == "two" ]]
then
echo "Here be dragons..."
fi
;;
Windows)
echo "Setting environment"
ESC="hello_windows"
if [[ "$PROJN" == "ONE" -o "$PROJN" == "two" ]]
then
echo "Here be dragons..."
fi
;;
Android)
echo "Setting environment"
ESC="hello_android"
if [[ "$PROJN" == "ONE" -o "$PROJN" == "two" ]]
then
echo "Here be dragons..."
fi
;;
esac
}
case.