6

function terminating if i give input as space or no input and enter

view full story
linux-howto

http://www.unix.com – 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 ... !!!" Code: 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' ]     the (HowTos)