Meaning of curly Braces in Manpages
I looked here help.ubuntu.com (and on the german ubuntu-user wiki) but couldnt find an answer.
I dont know what they mean e.g. in the manpage of mpstat
:
SYNOPSIS
mpstat [ -A ] [ -u ] [ -V ] [ -I { keyword [,...] | ALL } ] [ -P { cpu [,...] | ON | ALL } ] [ interval [ count ] ]
when they say -I { keyword [,...] | ALL }
or -P { cpu [,...] | ON | ALL }
I would appreciate any clarification.
Command syntax is given in a form that is a bit like Backus-Naur notation, described here.
The braces group together two or more options, one of which must be specified.
In the case of -I { keyword [,...] | ALL }
, that means you either specify keyword [,...]
or ALL.
Square braces [...]
mean that their content is optional and can either be added to the command or not.
Curly brackets containing pipe-separated items { ... | ... }
mean that you must specify one of those items.
Example:
my_command [--optional-argument] { --either-this | --or-that }
Given the syntax above, you have those options to call the command:
my_command --either-this
my_command --or-that
my_command --optional-argument --either-this
my_command --optional-argument --or-that
Taken from this handy guide,
Some options will have a limited list of choices. A list of choices will be comma seperated and put between braces.
{choice1,choice2} {yes,no}
Where you have -P { cpu [,...] | ON | ALL }
, it means you must choose one of the following options. The [,...] part means that you can supply a comma separated list.