vdhingra
Newbie level 2
HI ,
I am new to csh. I need to pass some command line arguments like "./abc.sh -os Linux -path abc"
I have defined the loop as shown below. But its taking "-os" switches as arguments. Its treating them as 4 arguments.
How to resolve it?
while ( $#argv != 0 )
switch ($argv[1])
"-kit":
KIT=$2;
echo "Proc arg missing"
breaksw
"-type":
TYPE=$1;
echo "TYPE is $1"
breaksw
default:
echo "Invalid arg"
breaksw
endsw
I am new to csh. I need to pass some command line arguments like "./abc.sh -os Linux -path abc"
I have defined the loop as shown below. But its taking "-os" switches as arguments. Its treating them as 4 arguments.
How to resolve it?
while ( $#argv != 0 )
switch ($argv[1])
"-kit":
KIT=$2;
echo "Proc arg missing"
breaksw
"-type":
TYPE=$1;
echo "TYPE is $1"
breaksw
default:
echo "Invalid arg"
breaksw
endsw