title: how to parse several arguments using command line arguments
body: <p>i am writing a command line utility in which i want to parse several arguments: right now i am not reading data from address(so please don't get confuse by -addr); my primary objective is to design the framework so that i can parse several arguments as follows.</p>
  
  <pre><code>filename read -addr value -addr2 value2 -addrN valueN -length value -range value -length2 value2 -lengthN valueN -width value -width2 value2 -widthN valueN
  </code></pre>
  
  <p>the N can have a maximum value of 64 and minimum value of 1.</p>
  
  <p>Please give some valuable suggestions so that i can do it.
  Thanks</p>