lets say I had a file(.csh)
File Contents
Script_1
{
code of script1
}
Script_2
{
code of script2
}
.
.
.
Script_n
{
code of script_n
}
Now the thing is if we run like
./file.csh -script1 <other arguments>
it should execute only script 1 code
Like wise , if we run
./file.csh -script2 <other arguments>
it should execute only script 2 code
Can any one tell the idea how to accomplish that?
You can grab command line parameters via
$nwherenis integer > 0 in order of argument passedIf you’d like to get all arguments except the first one together, you can use
shift: