Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

yes/no

read -p "Is this a good question (y/n)? " answer
case ${answer:0:1} in
    y|Y )
        echo Yes
    ;;
    * )
        echo No
    ;;
esac
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
7+2 =