|
Is it possible to find parameters?
I have a shell script and i pass 3 parameters to it.
Just give you an example
test.sh a=y/n b=y/n c=y/n
Pass y/n to a, b and c then it will decide what to do.
test.sh a=y b=n c=n
What i would like to do is rather then passing 3 parameter just pass a=y (only a is doing something like test.sh a=y) and skip others.
Now don't know if it is possible to look for something in parameters?
(Something like find if a,b and c have given to script always there will be one parameter).
Some scenarios
test.sh a=n b=y c=n
What i want test.sh b=y (skip a & c don't pass because no need)
test.sh a=n b=n c=y
What i want test.sh c=y (skip a & b don't pass because no need)
Thanks in advance.
|