Reputation: 2384
This is something I have seen many times in manuals, but never fully understood the syntax. When an argument is allowed to be an array of multiple values, what exactly does this syntax mean and how is it used to specify multiple args for the single flag/option?
command_name -f par_name=par_value[,par_name=par_value...]
Another common way I've seen this presented is:
usage: command_name [-f variable_list]
What is an example of this usage in practice? I have been trying with and without commas and brackets but nothing seems to be working.
Upvotes: 0
Views: 126
Reputation: 122383
command_name -f par_name=par_value[,par_name=par_value...]
The brackets here actually means that these options are optional. You don't add the bracket []
when you actually add these options.
So you can omit the extra options like :
command_name -f par_name=par_value
Or use it:
command_name -f par_name=par_value,par_name=par_value
or even more.
Upvotes: 1
Reputation: 17131
usage: command_name [-f variable_list]
This means that both command_name
and command_name -f variable_list
are valid
command_name -f par_name=par_value[,par_name=par_value...]
This means that:
command_name -f par_name=par_value
and
command_name -f par_name=par_value,par_name=par_value
and
command_name -f par_name=par_value,par_name=par_value,par_name=par_value
etc. are all valid.
Upvotes: 1