title: Simple calling a function within a function is not working/ have I missed somethig
body: <pre><code>APPLICATION_VERSION=&quot;1.0&quot;
  APPLICATION_HELP=&quot;SOME HELP TEXT&quot;
  
  function help(){
          echo &quot;h${APPLICATION_HELP}&quot;
          exit 0
  }
  help
  
  function versionapp(){
      echo &quot;v${APPLICATION_VERSION}&quot;
      exit 0
  }
  versionapp
  
  function check(){
      while getopts &quot;vh&quot; option; do
      case $option in
      v) 
       versionapp
      ;;
      h) 
       help
      ;;
      \? )
      echo &quot;You have entered an invalid option. The valid options are [r], [y], and [g]&quot;
      ;;
      esac
      done
  }
  check
  </code></pre>
  <p>Hi all usually I would not need to ask around this simple task- however, stuck here and can't figure out what is going wrong.</p>
  <p>Since I spent quite a bit of time I would appreciate the correct code and explanation?</p>