Skip to content

Instantly share code, notes, and snippets.

@peczenyj
Created November 4, 2013 12:08
Show Gist options
  • Select an option

  • Save peczenyj/7301627 to your computer and use it in GitHub Desktop.

Select an option

Save peczenyj/7301627 to your computer and use it in GitHub Desktop.
chamando a mesma funcao de forma recursiva
function foo {
read -p "digite a opcao: " OPCAO
case $OPCAO in
a) echo "a" ;;
b) echo "b" ;;
c) foo ;;
*) echo "opcao invalida '$OPCAO'"; exit 1 ;;
esac
}
foo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment