title: Portable getopt_long equivalent for use in shell scripting
body: <p>I would like to parse long options in a shell script. POSIX only provides <code>getopts</code> to parse single letter options. Does anyone know of a portable (POSIX) way to implement long option parsing in the shell? I've looked at what <code>autoconf</code> does when generating <code>configure</code> scripts, but the result is far from elegant. I can live with accepting only the full spellings of long options. Single letter options should still be allowed, possibly in groups.</p>
  
  <p>I'm thinking of a shell function taking a space separated list of args of the form option[=flags], where the flags indicate that the option takes an arg or can be specified multiple times. Unlike its C counterpart there is no need to distinguish between strings, integers and floats.</p>