i have script which get Input via READ value and compare it from file.
when found do some stuff...if not found again ask for Input until you dont enter Right value.
#!/bin/ksh
echo "SID must be in oratab file"
echo "Enter ORACLE_SID of Database:\c "
read ORACLE_SID
x=`cat /etc/oratab| grep $ORACLE_SID | wc -l`
for X in $x
do
if [[ $X -eq 1 ]];then
echo "SID FOUND"
else
echo "nothing found"
echo "Enter valid SID"
continue
fi
done
but script just check value ,it does not continue keep ask or value , if value is not correct.
Could you please help on it.
Thanks.