How do I take optional parameters in my shell script.
Command Line argument would be: ./abc.sh parm1 parm2 parm3 parm4
Here parm3 and parm4 are optional depending upon parm1(config)
How to write a shell script which will take mandatorily parm1 and parm2 as argument and treat the other two as optional parameters
./abc.sh p1 p2 p3 p4 p5if, as your question indicates, only 2, 3 or 4 arguments are acceptable. You should know about$#, the special parameter (variable) that reports the number 'command line arguments' ('positional parameters' in the formal jargon).