title: check the order & validate arguments to shell script
body: <p>I know similar questions may be asked on this ,but I am a total newbie to shell scripting &amp; not finding help (may be I am not able to understand the technicalities). I have a simple question:</p>
  
  <p>I have a simple script (testscript.sh) which needs 3 arguments &amp; I am passing these using three parameters &amp; running it like: (1st argument is a simple string, 2nd is the path to a filename &amp; 3rd is a folder name)</p>
  
  <pre><code>./testscript.sh --para1 "somestring" --para2 "/home/android/test/abc.xml" --para3 "/home/android/outputfolder"
  </code></pre>
  
  <p>Now I want to check whether the user has given provided all the reqd input values with proper parameters. I mean para3 must contain folder name, para2 must be a filename &amp; para1 must be the string OR they come in the same sequence.</p>
  
  <p>Also I would like to validate one more thing: currently I am expecting the user will enter the filename "/home/android/test/abc.xml" enclosed in double qoutes, but if the user doesnt enclose it in double quotes &amp; the folder/filename has a space in it, it would create issues, as I am not able to get the complete file/folder name including the spaces, it is breaking.</p>
  
  <p>Plz help. Thanx</p>