www.delorie.com/gnu/docs/glibc/libc_524.html   search  
 
Buy the book!


The GNU C Library

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

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.

25.2.1 Using the getopt function  
25.2.2 Example of Parsing Arguments with getopt  An example of parsing options with getopt.
25.2.3 Parsing Long Options with getopt_long  GNU suggests utilities accept long-named options; here is one way to do.
25.2.4 Example of Parsing Long Options with getopt_long  An example of using getopt_long.


  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003