Help on command line argument in csh

Status
Not open for further replies.

vdhingra

Newbie level 2
Joined
Feb 10, 2011
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,291
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
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…