Getopt - The GNU C Library

Next: Argp, Up: Parsing Program Arguments

### 25.2 Parsing program options using `getopt`

The `getopt` and `getopt_long` functions automate some of the chore involved in parsing typical unix command line options.

- Using Getopt: Using the `getopt` function.
- Example of Getopt: An example of parsing options with `getopt`.
- Getopt Long Options: GNU suggests utilities accept long-named options; here is one way to do.
- Getopt Long Option Example: An example of using `getopt_long`.