i have a script which takes input from user, if user gives either Y/y then it should continue, else it should quit by displaying user cancelled.
#!/bin/sh
echo " Enter your choice to continue y/Y OR n/N to quit "
read A
if [ "$A" = "y" || "$A" = "Y" ]
then
echo " user requested to continue "
##some commands
else
echo " User requested to cancel"
exit 1
fi
exit 0
#!/bin/sh
echo " Enter your choice to continue y/Y OR n/N to quit "
read A
if [ [ "$A" = "y" || "$A" = "Y" ] ]
then
echo " user requested to continue "
##some commands
else
echo " User requested to cancel"
exit 1
fi
exit 0
i passed parameter as Y, it is throwing below error