Last active
September 11, 2016 06:56
-
-
Save rahulinux/6579590 to your computer and use it in GitHub Desktop.
Revisions
-
rahulinux revised this gist
Sep 16, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ YesOrNo() { while : do read -p 'Do you want to Continue (yes/no?): ' answer case "${answer}" in -
rahulinux created this gist
Sep 16, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ YesOrNo() { while [[ $x = "" ]] do read -p 'Do you want to Continue (yes/no?): ' answer case "${answer}" in [yY]|[yY][eE][sS]) exit 0 ;; [nN]|[nN][oO]) exit 1 ;; esac done } # Usage: # if $( YesOrNo ); then # echo "Ans is yes.. Do something....." # else # echo "Ans is No... skip.." # fi