Can someone please tell me what is wrong with this (ksh)..
if [[ ${COMP_TEMP} = [0-9]+ ]] then
echo ${COMP_TEMP}
fi
What i need here is, say if the variable is a 1 or 2 digit number, then execute the if loop. Basically the variable can either be 1-30 or some other character sequence say '?', '&&' etc
Thanks, but that ain't going to work cause both 1 and ? are two bytes each.
The variable can either be a number from 1-30 or it can be some other character. I want the if loop to be a success only if the variable is a number from 1-30.