title: Parsing command line arguments in a shell script function
body: <p>The shell command line parameters list $@ prints nothing. So I have taken args in ALL_ARGS_PASSED and sent them to function. Even then Iam unable to parse the arguments.</p>
  
  <p>Parsing $@ (list of all commandline args)</p>
  
  <p>set them in ALL_ARGS_PASSED and tried to parse in function</p>
  
  <pre><code>ALL_PASSED_ARGS="$@"
  
  get_args_rethink()
  {
     #echo $ALL_PASSED_ARGS
     echo "All args passed $@"
     for arg in $ALL_PASSED_ARGS
     do
         KEY=$(echo $arg | cut -f1 -d=)
         VALUE=$(echo $arg | cut -f2 -d=)
  
         case "$KEY" in
             GIT_USERNAME)                     READ_GIT_USERNAME=${VALUE} ;;
             GIT_PASSWORD)                     READ_GIT_PASSWORD=${VALUE} ;;
             *)                                echo "PLEASE SEE USAGE"  ;;
         esac
     done
  }
  
  get_args_rethink aa=1 bb=2
  echo "$READ_GIT_USERNAME first parameter"
  echo "$READ_GIT_PASSWORD second parameter"
  </code></pre>
  
  <p>Expecting ALL_ARGS_PASSED contains all arguments
  This need to be successfully parsed.</p>