Sep 26, 2011 #1 V 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
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