689 lines
22 KiB
HTML
689 lines
22 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of GETOPT</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>GETOPT</H1>
|
|
Section: Linux Programmer's Manual (3)<BR>Updated: 2019-03-06<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
getopt, getopt_long, getopt_long_only,
|
|
optarg, optind, opterr, optopt - Parse command-line options
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<PRE>
|
|
<B>#include <<A HREF="file:///usr/include/unistd.h">unistd.h</A>></B>
|
|
|
|
<B>int getopt(int </B><I>argc</I><B>, char * const </B><I>argv[]</I><B>,</B>
|
|
<B> const char *</B><I>optstring</I><B>);</B>
|
|
|
|
<B>extern char *</B><I>optarg</I><B>;</B>
|
|
<B>extern int </B><I>optind</I><B>, </B><I>opterr</I><B>, </B><I>optopt</I><B>;</B>
|
|
|
|
<B>#include <<A HREF="file:///usr/include/getopt.h">getopt.h</A>></B>
|
|
|
|
<B>int getopt_long(int </B><I>argc</I><B>, char * const </B><I>argv[]</I><B>,</B>
|
|
<B> const char *</B><I>optstring</I><B>,</B>
|
|
<B> const struct option *</B><I>longopts</I><B>, int *</B><I>longindex</I><B>);</B>
|
|
|
|
<B>int getopt_long_only(int </B><I>argc</I><B>, char * const </B><I>argv[]</I><B>,</B>
|
|
<B> const char *</B><I>optstring</I><B>,</B>
|
|
<B> const struct option *</B><I>longopts</I><B>, int *</B><I>longindex</I><B>);</B>
|
|
</PRE>
|
|
|
|
<P>
|
|
|
|
|
|
Feature Test Macro Requirements for glibc (see
|
|
<B><A HREF="/cgi-bin/man/man2html?7+feature_test_macros">feature_test_macros</A></B>(7)):
|
|
|
|
|
|
|
|
<P>
|
|
|
|
<B>getopt</B>():
|
|
|
|
_POSIX_C_SOURCE >= 2 || _XOPEN_SOURCE
|
|
<BR>
|
|
|
|
<B>getopt_long</B>(),
|
|
|
|
<B>getopt_long_only</B>():
|
|
|
|
_GNU_SOURCE
|
|
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
The
|
|
<B>getopt</B>()
|
|
|
|
function parses the command-line arguments.
|
|
Its arguments
|
|
<I>argc</I>
|
|
|
|
and
|
|
<I>argv</I>
|
|
|
|
are the argument count and array as passed to the
|
|
<I>main</I>()
|
|
|
|
function on program invocation.
|
|
An element of <I>argv</I> that starts with '-'
|
|
(and is not exactly "-" or "--")
|
|
is an option element.
|
|
The characters of this element
|
|
(aside from the initial '-') are option characters.
|
|
If
|
|
<B>getopt</B>()
|
|
|
|
is called repeatedly, it returns successively each of the option characters
|
|
from each of the option elements.
|
|
<P>
|
|
|
|
The variable
|
|
<I>optind</I>
|
|
|
|
is the index of the next element to be processed in
|
|
<I>argv</I>.
|
|
|
|
The system initializes this value to 1.
|
|
The caller can reset it to 1 to restart scanning of the same
|
|
<I>argv</I>,
|
|
|
|
or when scanning a new argument vector.
|
|
<P>
|
|
|
|
If
|
|
<B>getopt</B>()
|
|
|
|
finds another option character, it returns that
|
|
character, updating the external variable <I>optind</I> and a static
|
|
variable <I>nextchar</I> so that the next call to
|
|
<B>getopt</B>()
|
|
|
|
can
|
|
resume the scan with the following option character or
|
|
<I>argv</I>-element.
|
|
<P>
|
|
|
|
If there are no more option characters,
|
|
<B>getopt</B>()
|
|
|
|
returns -1.
|
|
Then <I>optind</I> is the index in <I>argv</I> of the first
|
|
<I>argv</I>-element that is not an option.
|
|
<P>
|
|
|
|
<I>optstring</I>
|
|
|
|
is a string containing the legitimate option characters.
|
|
If such a
|
|
character is followed by a colon, the option requires an argument, so
|
|
<B>getopt</B>()
|
|
|
|
places a pointer to the following text in the same
|
|
<I>argv</I>-element, or the text of the following <I>argv</I>-element, in
|
|
<I>optarg</I>.
|
|
|
|
Two colons mean an option takes
|
|
an optional arg; if there is text in the current <I>argv</I>-element
|
|
(i.e., in the same word as the option name itself, for example, "-oarg"),
|
|
then it is returned in <I>optarg</I>, otherwise <I>optarg</I> is set to zero.
|
|
This is a GNU extension.
|
|
If
|
|
<I>optstring</I>
|
|
|
|
contains
|
|
<B>W</B>
|
|
|
|
followed by a semicolon, then
|
|
<B>-W foo</B>
|
|
|
|
is treated as the long option
|
|
<B>--foo</B>.
|
|
|
|
(The
|
|
<B>-W</B>
|
|
|
|
option is reserved by POSIX.2 for implementation extensions.)
|
|
This behavior is a GNU extension, not available with libraries before
|
|
glibc 2.
|
|
<P>
|
|
|
|
By default,
|
|
<B>getopt</B>()
|
|
|
|
permutes the contents of <I>argv</I> as it
|
|
scans, so that eventually all the nonoptions are at the end.
|
|
Two other modes are also implemented.
|
|
If the first character of
|
|
<I>optstring</I> is '+' or the environment variable
|
|
<B>POSIXLY_CORRECT</B>
|
|
|
|
is set, then option processing stops as soon as a nonoption argument is
|
|
encountered.
|
|
If the first character of <I>optstring</I> is '-', then
|
|
each nonoption <I>argv</I>-element is handled as if it were the argument of
|
|
an option with character code 1. (This is used by programs that were
|
|
written to expect options and other <I>argv</I>-elements in any order
|
|
and that care about the ordering of the two.)
|
|
The special argument "--" forces an end of option-scanning regardless
|
|
of the scanning mode.
|
|
<P>
|
|
|
|
While processing the option list,
|
|
<B>getopt</B>()
|
|
|
|
can detect two kinds of errors:
|
|
(1) an option character that was not specified in
|
|
<I>optstring</I>
|
|
|
|
and (2) a missing option argument
|
|
(i.e., an option at the end of the command line without an expected argument).
|
|
Such errors are handled and reported as follows:
|
|
<DL COMPACT>
|
|
<DT id="1">*<DD>
|
|
By default,
|
|
<B>getopt</B>()
|
|
|
|
prints an error message on standard error,
|
|
places the erroneous option character in
|
|
<I>optopt</I>,
|
|
|
|
and returns '?' as the function result.
|
|
<DT id="2">*<DD>
|
|
If the caller has set the global variable
|
|
<I>opterr</I>
|
|
|
|
to zero, then
|
|
<B>getopt</B>()
|
|
|
|
does not print an error message.
|
|
The caller can determine that there was an error by testing whether
|
|
the function return value is '?'.
|
|
(By default,
|
|
<I>opterr</I>
|
|
|
|
has a nonzero value.)
|
|
<DT id="3">*<DD>
|
|
If the first character
|
|
(following any optional '+' or '-' described above)
|
|
of <I>optstring</I>
|
|
is a colon (':'), then
|
|
<B>getopt</B>()
|
|
|
|
likewise does not print an error message.
|
|
In addition, it returns ':' instead of '?' to
|
|
indicate a missing option argument.
|
|
This allows the caller to distinguish the two different types of errors.
|
|
|
|
</DL>
|
|
<A NAME="lbAE"> </A>
|
|
<H3>getopt_long() and getopt_long_only()</H3>
|
|
|
|
The
|
|
<B>getopt_long</B>()
|
|
|
|
function works like
|
|
<B>getopt</B>()
|
|
|
|
except that it also accepts long options, started with two dashes.
|
|
(If the program accepts only long options, then
|
|
<I>optstring</I>
|
|
|
|
should be specified as an empty string (""), not NULL.)
|
|
Long option names may be abbreviated if the abbreviation is
|
|
unique or is an exact match for some defined option.
|
|
A long option
|
|
may take a parameter, of the form
|
|
<B>--arg=param</B>
|
|
|
|
or
|
|
<B>--arg param</B>.
|
|
|
|
<P>
|
|
|
|
<I>longopts</I>
|
|
|
|
is a pointer to the first element of an array of
|
|
<I>struct option</I>
|
|
|
|
declared in
|
|
<I><<A HREF="file:///usr/include/getopt.h">getopt.h</A>></I>
|
|
|
|
as
|
|
<P>
|
|
|
|
|
|
|
|
struct option {
|
|
<BR> const char *name;
|
|
<BR> int has_arg;
|
|
<BR> int *flag;
|
|
<BR> int val;
|
|
};
|
|
|
|
|
|
<P>
|
|
|
|
The meanings of the different fields are:
|
|
<DL COMPACT>
|
|
<DT id="4"><I>name</I>
|
|
|
|
<DD>
|
|
is the name of the long option.
|
|
<DT id="5"><I>has_arg</I>
|
|
|
|
<DD>
|
|
is:
|
|
<B>no_argument</B> (or 0) if the option does not take an argument;
|
|
<B>required_argument</B> (or 1) if the option requires an argument; or
|
|
<B>optional_argument</B> (or 2) if the option takes an optional argument.
|
|
<DT id="6"><I>flag</I>
|
|
|
|
<DD>
|
|
specifies how results are returned for a long option.
|
|
If <I>flag</I>
|
|
is NULL, then
|
|
<B>getopt_long</B>()
|
|
|
|
returns <I>val</I>.
|
|
(For example, the calling program may set <I>val</I> to the equivalent short
|
|
option character.)
|
|
Otherwise,
|
|
<B>getopt_long</B>()
|
|
|
|
returns 0, and
|
|
<I>flag</I> points to a variable which is set to <I>val</I> if the
|
|
option is found, but left unchanged if the option is not found.
|
|
<DT id="7"><I>val</I><DD>
|
|
is the value to return, or to load into the variable pointed
|
|
to by <I>flag</I>.
|
|
</DL>
|
|
<P>
|
|
|
|
The last element of the array has to be filled with zeros.
|
|
<P>
|
|
|
|
If <I>longindex</I> is not NULL, it
|
|
points to a variable which is set to the index of the long option relative to
|
|
<I>longopts</I>.
|
|
|
|
<P>
|
|
|
|
<B>getopt_long_only</B>()
|
|
|
|
is like
|
|
<B>getopt_long</B>(),
|
|
|
|
but '-' as well
|
|
as "--" can indicate a long option.
|
|
If an option that starts with '-'
|
|
(not "--") doesn't match a long option, but does match a short option,
|
|
it is parsed as a short option instead.
|
|
<A NAME="lbAF"> </A>
|
|
<H2>RETURN VALUE</H2>
|
|
|
|
If an option was successfully found, then
|
|
<B>getopt</B>()
|
|
|
|
returns the option character.
|
|
If all command-line options have been parsed, then
|
|
<B>getopt</B>()
|
|
|
|
returns -1.
|
|
If
|
|
<B>getopt</B>()
|
|
|
|
encounters an option character that was not in
|
|
<I>optstring</I>,
|
|
|
|
then '?' is returned.
|
|
If
|
|
<B>getopt</B>()
|
|
|
|
encounters an option with a missing argument,
|
|
then the return value depends on the first character in
|
|
<I>optstring</I>:
|
|
|
|
if it is ':', then ':' is returned; otherwise '?' is returned.
|
|
<P>
|
|
|
|
<B>getopt_long</B>()
|
|
|
|
and
|
|
<B>getopt_long_only</B>()
|
|
|
|
also return the option
|
|
character when a short option is recognized.
|
|
For a long option, they
|
|
return <I>val</I> if <I>flag</I> is NULL, and 0 otherwise.
|
|
Error and -1 returns are the same as for
|
|
<B>getopt</B>(),
|
|
|
|
plus '?' for an
|
|
ambiguous match or an extraneous parameter.
|
|
<A NAME="lbAG"> </A>
|
|
<H2>ENVIRONMENT</H2>
|
|
|
|
<DL COMPACT>
|
|
<DT id="8"><B>POSIXLY_CORRECT</B>
|
|
|
|
<DD>
|
|
If this is set, then option processing stops as soon as a nonoption
|
|
argument is encountered.
|
|
<DT id="9"><B>_<PID>_GNU_nonoption_argv_flags_</B>
|
|
|
|
<DD>
|
|
This variable was used by
|
|
<B><A HREF="/cgi-bin/man/man2html?1+bash">bash</A></B>(1)
|
|
|
|
2.0 to communicate to glibc which arguments are the results of
|
|
wildcard expansion and so should not be considered as options.
|
|
This behavior was removed in
|
|
<B><A HREF="/cgi-bin/man/man2html?1+bash">bash</A></B>(1)
|
|
|
|
version 2.01, but the support remains in glibc.
|
|
</DL>
|
|
<A NAME="lbAH"> </A>
|
|
<H2>ATTRIBUTES</H2>
|
|
|
|
For an explanation of the terms used in this section, see
|
|
<B><A HREF="/cgi-bin/man/man2html?7+attributes">attributes</A></B>(7).
|
|
|
|
<TABLE BORDER>
|
|
<TR VALIGN=top><TD><B>Interface</B></TD><TD><B>Attribute</B></TD><TD><B>Value</B><BR></TD></TR>
|
|
<TR VALIGN=top><TD>
|
|
<B>getopt</B>(),
|
|
|
|
<B>getopt_long</B>(),
|
|
|
|
<B>getopt_long_only</B>()
|
|
|
|
</TD><TD>Thread safety</TD><TD>MT-Unsafe race:getopt env<BR></TD></TR>
|
|
</TABLE>
|
|
|
|
<A NAME="lbAI"> </A>
|
|
<H2>CONFORMING TO</H2>
|
|
|
|
<DL COMPACT>
|
|
<DT id="10"><B>getopt</B>():
|
|
|
|
<DD>
|
|
POSIX.1-2001, POSIX.1-2008, and POSIX.2,
|
|
provided the environment variable
|
|
<B>POSIXLY_CORRECT</B>
|
|
|
|
is set.
|
|
Otherwise, the elements of <I>argv</I> aren't really
|
|
<I>const</I>,
|
|
|
|
because we permute them.
|
|
We pretend they're
|
|
<I>const</I>
|
|
|
|
in the prototype to be compatible with other systems.
|
|
<DT id="11"><DD>
|
|
The use of '+' and '-' in
|
|
<I>optstring</I>
|
|
|
|
is a GNU extension.
|
|
<DT id="12"><DD>
|
|
On some older implementations,
|
|
<B>getopt</B>()
|
|
|
|
was declared in
|
|
<I><<A HREF="file:///usr/include/stdio.h">stdio.h</A>></I>.
|
|
|
|
SUSv1 permitted the declaration to appear in either
|
|
<I><<A HREF="file:///usr/include/unistd.h">unistd.h</A>></I>
|
|
|
|
or
|
|
<I><<A HREF="file:///usr/include/stdio.h">stdio.h</A>></I>.
|
|
|
|
POSIX.1-1996 marked the use of
|
|
<I><<A HREF="file:///usr/include/stdio.h">stdio.h</A>></I>
|
|
|
|
for this purpose as LEGACY.
|
|
POSIX.1-2001 does not require the declaration to appear in
|
|
<I><<A HREF="file:///usr/include/stdio.h">stdio.h</A>></I>.
|
|
|
|
<DT id="13"><B>getopt_long</B>() and <B>getopt_long_only</B>():
|
|
|
|
<DD>
|
|
These functions are GNU extensions.
|
|
</DL>
|
|
<A NAME="lbAJ"> </A>
|
|
<H2>NOTES</H2>
|
|
|
|
A program that scans multiple argument vectors,
|
|
or rescans the same vector more than once,
|
|
and wants to make use of GNU extensions such as '+'
|
|
and '-' at the start of
|
|
<I>optstring</I>,
|
|
|
|
or changes the value of
|
|
<B>POSIXLY_CORRECT</B>
|
|
|
|
between scans,
|
|
must reinitialize
|
|
<B>getopt</B>()
|
|
|
|
by resetting
|
|
<I>optind</I>
|
|
|
|
to 0, rather than the traditional value of 1.
|
|
(Resetting to 0 forces the invocation of an internal initialization
|
|
routine that rechecks
|
|
<B>POSIXLY_CORRECT</B>
|
|
|
|
and checks for GNU extensions in
|
|
<I>optstring</I>.)
|
|
|
|
<A NAME="lbAK"> </A>
|
|
<H2>EXAMPLE</H2>
|
|
|
|
<A NAME="lbAL"> </A>
|
|
<H3>getopt()</H3>
|
|
|
|
The following trivial example program uses
|
|
<B>getopt</B>()
|
|
|
|
to handle two program options:
|
|
<I>-n</I>,
|
|
|
|
with no associated value; and
|
|
<I>-t val</I>,
|
|
|
|
which expects an associated value.
|
|
<P>
|
|
|
|
|
|
#include <<A HREF="file:///usr/include/unistd.h">unistd.h</A>>
|
|
#include <<A HREF="file:///usr/include/stdlib.h">stdlib.h</A>>
|
|
#include <<A HREF="file:///usr/include/stdio.h">stdio.h</A>>
|
|
<P>
|
|
int
|
|
main(int argc, char *argv[])
|
|
{
|
|
<BR> int flags, opt;
|
|
<BR> int nsecs, tfnd;
|
|
<P>
|
|
<BR> nsecs = 0;
|
|
<BR> tfnd = 0;
|
|
<BR> flags = 0;
|
|
<BR> while ((opt = getopt(argc, argv, "nt:")) != -1) {
|
|
<BR> switch (opt) {
|
|
<BR> case 'n':
|
|
<BR> flags = 1;
|
|
<BR> break;
|
|
<BR> case 't':
|
|
<BR> nsecs = atoi(optarg);
|
|
<BR> tfnd = 1;
|
|
<BR> break;
|
|
<BR> default: /* '?' */
|
|
<BR> fprintf(stderr, "Usage: %s [-t nsecs] [-n] name\n",
|
|
<BR> argv[0]);
|
|
<BR> exit(EXIT_FAILURE);
|
|
<BR> }
|
|
<BR> }
|
|
<P>
|
|
<BR> printf("flags=%d; tfnd=%d; nsecs=%d; optind=%d\n",
|
|
<BR> flags, tfnd, nsecs, optind);
|
|
<P>
|
|
<BR> if (optind >= argc) {
|
|
<BR> fprintf(stderr, "Expected argument after options\n");
|
|
<BR> exit(EXIT_FAILURE);
|
|
<BR> }
|
|
<P>
|
|
<BR> printf("name argument = %s\n", argv[optind]);
|
|
<P>
|
|
<BR> /* Other code omitted */
|
|
<P>
|
|
<BR> exit(EXIT_SUCCESS);
|
|
}
|
|
|
|
<A NAME="lbAM"> </A>
|
|
<H3>getopt_long()</H3>
|
|
|
|
The following example program illustrates the use of
|
|
<B>getopt_long</B>()
|
|
|
|
with most of its features.
|
|
<P>
|
|
|
|
|
|
#include <<A HREF="file:///usr/include/stdio.h">stdio.h</A>> /* for printf */
|
|
#include <<A HREF="file:///usr/include/stdlib.h">stdlib.h</A>> /* for exit */
|
|
#include <<A HREF="file:///usr/include/getopt.h">getopt.h</A>>
|
|
<P>
|
|
int
|
|
main(int argc, char **argv)
|
|
{
|
|
<BR> int c;
|
|
<BR> int digit_optind = 0;
|
|
<P>
|
|
<BR> while (1) {
|
|
<BR> int this_option_optind = optind ? optind : 1;
|
|
<BR> int option_index = 0;
|
|
<BR> static struct option long_options[] = {
|
|
<BR> {"add", required_argument, 0, 0 },
|
|
<BR> {"append", no_argument, 0, 0 },
|
|
<BR> {"delete", required_argument, 0, 0 },
|
|
<BR> {"verbose", no_argument, 0, 0 },
|
|
<BR> {"create", required_argument, 0, 'c'},
|
|
<BR> {"file", required_argument, 0, 0 },
|
|
<BR> {0, 0, 0, 0 }
|
|
<BR> };
|
|
<P>
|
|
<BR> c = getopt_long(argc, argv, "abc:d:012",
|
|
<BR> long_options, &option_index);
|
|
<BR> if (c == -1)
|
|
<BR> break;
|
|
<P>
|
|
<BR> switch (c) {
|
|
<BR> case 0:
|
|
<BR> printf("option %s", long_options[option_index].name);
|
|
<BR> if (optarg)
|
|
<BR> printf(" with arg %s", optarg);
|
|
<BR> printf("\n");
|
|
<BR> break;
|
|
<P>
|
|
<BR> case '0':
|
|
<BR> case '1':
|
|
<BR> case '2':
|
|
<BR> if (digit_optind != 0 && digit_optind != this_option_optind)
|
|
<BR> printf("digits occur in two different argv-elements.\n");
|
|
<BR> digit_optind = this_option_optind;
|
|
<BR> printf("option %c\n", c);
|
|
<BR> break;
|
|
<P>
|
|
<BR> case 'a':
|
|
<BR> printf("option a\n");
|
|
<BR> break;
|
|
<P>
|
|
<BR> case 'b':
|
|
<BR> printf("option b\n");
|
|
<BR> break;
|
|
<P>
|
|
<BR> case 'c':
|
|
<BR> printf("option c with value '%s'\n", optarg);
|
|
<BR> break;
|
|
<P>
|
|
<BR> case 'd':
|
|
<BR> printf("option d with value '%s'\n", optarg);
|
|
<BR> break;
|
|
<P>
|
|
<BR> case '?':
|
|
<BR> break;
|
|
<P>
|
|
<BR> default:
|
|
<BR> printf("?? getopt returned character code 0%o ??\n", c);
|
|
<BR> }
|
|
<BR> }
|
|
<P>
|
|
<BR> if (optind < argc) {
|
|
<BR> printf("non-option ARGV-elements: ");
|
|
<BR> while (optind < argc)
|
|
<BR> printf("%s ", argv[optind++]);
|
|
<BR> printf("\n");
|
|
<BR> }
|
|
<P>
|
|
<BR> exit(EXIT_SUCCESS);
|
|
}
|
|
|
|
<A NAME="lbAN"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+getopt">getopt</A></B>(1),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?3+getsubopt">getsubopt</A></B>(3)
|
|
|
|
<A NAME="lbAO"> </A>
|
|
<H2>COLOPHON</H2>
|
|
|
|
This page is part of release 5.05 of the Linux
|
|
<I>man-pages</I>
|
|
|
|
project.
|
|
A description of the project,
|
|
information about reporting bugs,
|
|
and the latest version of this page,
|
|
can be found at
|
|
<A HREF="https://www.kernel.org/doc/man-pages/.">https://www.kernel.org/doc/man-pages/.</A>
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="14"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="15"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="16"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DL>
|
|
<DT id="17"><A HREF="#lbAE">getopt_long() and getopt_long_only()</A><DD>
|
|
</DL>
|
|
<DT id="18"><A HREF="#lbAF">RETURN VALUE</A><DD>
|
|
<DT id="19"><A HREF="#lbAG">ENVIRONMENT</A><DD>
|
|
<DT id="20"><A HREF="#lbAH">ATTRIBUTES</A><DD>
|
|
<DT id="21"><A HREF="#lbAI">CONFORMING TO</A><DD>
|
|
<DT id="22"><A HREF="#lbAJ">NOTES</A><DD>
|
|
<DT id="23"><A HREF="#lbAK">EXAMPLE</A><DD>
|
|
<DL>
|
|
<DT id="24"><A HREF="#lbAL">getopt()</A><DD>
|
|
<DT id="25"><A HREF="#lbAM">getopt_long()</A><DD>
|
|
</DL>
|
|
<DT id="26"><A HREF="#lbAN">SEE ALSO</A><DD>
|
|
<DT id="27"><A HREF="#lbAO">COLOPHON</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:44 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|