Showing results for 
Search instead for 
Did you mean: 


Waqar Razi
Regular Advisor


I want to write a script to do the over the network ignite backups. What I want to do is the script checks if we supply options like -s, -a, -n through command line, if yes it uses them and if not, it uses the default values.

I have done that by passing command line arguments but my manager doesnt want that. He wants to use the same option indicators as the original make_net_recovery commad. This way the input parameters don’t have to be in any required sequence.

I just came to know it can be done with getopts, can some one please help me in writing the script?
James R. Ferguson
Acclaimed Contributor

Re: getopts

Hi Wagar:

There is an example script in the manpages that should get you going:



Re: getopts

It would have been better to continue your related questions in your previous thread: