title: Using getopts to process long and short command line options
body: <p>I wish to have long and short forms of command line options invoked using my shell script.</p>
  
  <p>I know that <code>getopts</code> can be used, but like in Perl, I have not been able to do the same with shell.</p>
  
  <p>Any ideas on how this can be done, so that I can use options like:</p>
  
  <pre><code>./shell.sh --copyfile abc.pl /tmp/
  ./shell.sh -c abc.pl /tmp/
  </code></pre>
  
  <p>In the above, both the commands mean the same thing to my shell, but using <code>getopts</code>, I have not been able to implement these?</p>