title: How to get arguments with flags in Bash
body: <p>I know that I can easily get positioned parameters like this in bash:</p>
  
  <p><code>$0</code> or <code>$1</code></p>
  
  <p>I want to be able to use flag options like this to specify for what each parameter is used:</p>
  
  <pre><code>mysql -u user -h host
  </code></pre>
  
  <p>What is the best way to get <code>-u param</code> value and <code>-h param</code> value by flag instead of by position?</p>