title: command line argument in shell scripting
body: <p>HI all i am newbie to scripting, i am here with problem ,that i am not able to pass command line variable to my script .</p>
  
  <pre><code>biz$: ./myproject.sh -x file2
  </code></pre>
  
  <p>My(given) myproject has these contents:</p>
  
  <pre><code> Type ="" //here i pass first argument
   while [ $# -gt 0]
   case "$1" in 
         -x)        shift; type = "x" &gt;&amp;2;shift ;;
         -y)        shift; type = "y" &gt;&amp;2;shift ;;
   ###################################################
   BEGIN{                            
         if ($7 == '/'){
             if ($2 != "zzzz"){
                 printf ("error",$0);
  
             if ($3 &lt; 111){
                 printf ("error", $0);
           }
  
   file = " " //here i want to pass my argument file2.          
  </code></pre>
  
  <p>Please help me out to solve this, i am not able to move furthur without solving this, i am new guy to scripting. I cant cange $2 $3 $7..Experts pls i need your suggestion.</p>