This still has the &quot;list the options twice&quot; wart though.  Of course there&#x27;s no way to avoid that for shell scripts, since getopt(1) has to explode the options before the rest of your script starts looking at them.