title: looping through arguments in shell script?
body: <p>I am writing my first ever Shell script today. I think I have found everything I need online but need help on one thing:</p>
  
  <p>I want to be able to pass a couple of optional arguments when the script is called: e.g <code>myscript.sh -filename somefilename -location some/file/location -deleteoption yes</code></p>
  
  <p>all them 3 options are optional so I need my script at the very first stage to loop through each argument and then depending on the descriptor of the argument (e.g <code>-filename</code>) store the value (<code>somefilename</code>) in to the correct variable?</p>
  
  <p>another thing is that the options can be given in any order. </p>
  
  <p>How do I go about achieving this functionality?</p>