title: unrecognized option error: getopt command in shell
body: <p>I'm new to shell and Linux, it would be great if someone can help me find what is wrong in the command:</p>
  
  <pre><code>if ! options=$(getopt -n myscript -l a:,b:,cc:,dd:,ee:,ff:,gg:,hh: -- "$@"); then exit 1; fi
  </code></pre>
  
  <p>I get an error msg:</p>
  
  <pre><code>mhagent: unrecognized option '--hh'
  options=' --aa '\''val1'\'' --ibb '\''val2'\'' --cc '\''val4'\'' --dd '\''val4'\'' --ee '\''val5'\'' --ff '\''val6'\'' --gg '\''val7'\'' --'
  </code></pre>
  
  <p>If I remove the last option: hh, it works fine.</p>
  
  <pre><code>if ! options=$(getopt -n myscript -l a:,b:,cc:,dd:,ee:,ff:,gg: -- "$@"); then exit 1; fi
  </code></pre>