PROBLEM 1 :
I want to run a batch script (xyz.bat ) that takes ,say, 3 tags and their corresponding values :
Example of the command : xyz.bat -a 12 -b 23 -c 14
How can i check how many arguments i have passed to this script and iterate over each and every argument .
I would want the script to take parse the command line arguments and perform the task based on the tag
The exact operation to be done :
Parse ( command line arguments )
if ( -a ) :
set variable1 to 12
if ( -b ) :
set variable2 to 23
if ( -c ) :
set variable3 to 14
PROBLEM 2 :
how to check if the 2nd argument is a string and not null similar to
if [ -n $2 ] check , in shell scripts.