Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

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.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top