4
4
For example: ./sample1 *.* --funct-opt
7
Usage: sample1 -iINT|--int-opt=INT [-h|--help] [--detailed-help] [--full-help]
8
[-V|--version] [-sfilename|--str-opt=filename] [-mINT|--my-opt=INT]
9
[--flag-opt] [-F|--funct-opt] [--long-opt=LONG] [--def-opt=STRING]
7
Usage: sample1 -iINT|--int-opt=INT [-h|--help] [--detailed-help] [--full-help]
8
[-V|--version] [-sfilename|--str-opt=filename] [-mINT|--my-opt=INT]
9
[--flag-opt] [-F|--funct-opt] [--long-opt=LONG] [--def-opt=STRING]
10
10
[--enum-opt=STRING] [-DINT|--dependant=INT] [FILES]...
12
12
-h, --help Print help and exit
13
--detailed-help Print help, including all details and hidden options,
13
--detailed-help Print help, including all details and hidden options,
15
15
--full-help Print help, including hidden options, and exit
16
16
-V, --version Print version and exit
19
19
A brief text description before the other options.
21
-m, --my-opt=INT Another integer option, this time the description of
22
the option should be "quite" long to require
23
wrapping... possibly more than one wrapping :-)
21
-m, --my-opt=INT Another integer option, this time the description of
22
the option should be "quite" long to require
23
wrapping... possibly more than one wrapping :-)
25
25
require a line break
26
26
-i, --int-opt=INT A int option (mandatory)
32
32
--flag-opt A flag option (default=off)
33
33
-F, --funct-opt A function option
35
A function option is basically an option with no argument. It can be used,
35
A function option is basically an option with no argument. It can be used,
36
36
e.g., to specify a specific behavior for a program.
38
Well, this further explanation is quite useless, but it's only to show an
39
example of an option with details, which will be printed only when
38
Well, this further explanation is quite useless, but it's only to show an
39
example of an option with details, which will be printed only when
40
40
--detailed-help is given at the command line.
42
42
last option section:
43
43
--long-opt=LONG A long option
44
44
--def-opt=STRING A string option with default (default=`Hello')
45
--enum-opt=STRING A string option with list of values (possible
46
values="foo", "bar", "hello", "bye"
45
--enum-opt=STRING A string option with list of values (possible
46
values="foo", "bar", "hello", "bye"
48
48
-S, --secret=INT hidden option will not appear in --help
49
49
-D, --dependant=INT option that depends on str-opt