Created
January 11, 2019 19:46
-
-
Save adrianolsk/072b704afc481a3134cd0442d20cba10 to your computer and use it in GitHub Desktop.
Get input options in a bash script
This file contains 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 characters
NORMAL="\\033[0;39m" | |
RED="\\033[1;31m" | |
BLUE="\\033[1;34m" | |
GREEN="\\033[1;32m" | |
while true; do | |
echo -e "$BLUE------------------------------------------" | |
echo -e "$BLUE Escolha uma opção: $NORMAL" | |
echo "" | |
echo -e "$GREEN 1 - Elastisearch Health Status " | |
echo -e " 2 - Docker Engine Restart" | |
echo -e "$RED 3 - Sair $NORMAL" | |
read OPCAO | |
case $OPCAO in | |
[1]* ) curl -XGET http://localhost:9200/_cluster/health?pretty ;; | |
[3]* ) exit;; | |
* ) echo "Escolha uma opção.";; | |
esac | |
#curl -XGET http://localhost:9200/_cluster/health?pretty | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment