Skip to content

Instantly share code, notes, and snippets.

@adrianolsk
Created January 11, 2019 19:46
Show Gist options
  • Save adrianolsk/072b704afc481a3134cd0442d20cba10 to your computer and use it in GitHub Desktop.
Save adrianolsk/072b704afc481a3134cd0442d20cba10 to your computer and use it in GitHub Desktop.
Get input options in a bash script
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