Chapter 2. Arguments, Options, and the Environment
In this chapter
Command-line option and argument interpretation is usually the first task of any program. This chapter examines how C (and C++) programs access their command-line arguments, describes standard routines for parsing options, and takes a look at the environment.
Option and Argument Conventions
The word arguments has two meanings. The more technical definition is “all the ’words’ on the command line.” For example:
$ ls main.c opts.c process.c
Here, the user typed four “words.” All four words ...
Get Linux® Programming by Example now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.