title: Combine options and arguments in BASH script
body: <p>My Bash-Script should accept arguments and options.
  Moreover arguments and options should be passed to another script.</p>
  
  <p>The second part I've solved:</p>
  
  <pre><code>for argument in "$@"; do
      options $argument
  done
  
  another_script $ox $arguments
  
  function options {
    case "$1" in
      -x) selection=1
      -y) selection=2
      -h|--help) help_message;;
      -*) ox="$ox $1";;
      *) arguments="$arguments $1";;
    esac
  }
  </code></pre>
  
  <p>Now I don't know how to implement an argument "-t" where the user can specify some text</p>
  
  <p>It should look something like this:</p>
  
  <pre><code>function options {
        case "$1" in
          -t) user_text=[ENTERED TEXT FOR OPTION T]
          -x) selection=1
          -y) selection=2
          -h|--help) help_message;;
          -*) ox="$ox $1";;
          *) arguments="$arguments $1";;
        esac
      }
  </code></pre>