HI
i have written a script to ask input from the user.
this script should promote the user for y/n input. if user enters anyother input then y/n
the script promotes him again. this below code is working fine for all the cases.
except for space and enter " if i give space and enter it is printing
echo "\n Goodbye ... !!!"
while [ ${confirm} != 'y' -a ${confirm} != 'Y' ]
do
echo "\n Do you want to continue ? (y/n)"
read confirm # reads the option and proceedsconfirm
if [ ${confirm} != 'n' -a ${confirm} != 'N' ]
then
if [ ${confirm} != 'y' -a ${confirm} != 'Y' ]
then
echo "\n ********** Warning - Invalid input -Please enter a valid input **********"
else
echo
fi
else
echo "************ User terminated ********"
echo "\n Goodbye ... !!!"
exit 0;
fi
done
Any ideas:wall::wall::wall::wall::wall::wall: