February 2001
Beginner to intermediate
448 pages
9h 2m
English
Official Description
Parses command-line options (such as -x).
Syntax
getopts optstring name [arg...]
Options
None
Oddities
Can be flaky. I've had some incompatibilities with the Bourne shell in the past—none recently, though.
Example
Chapter 13, “Pulling It All Together,” has an example of using getopts.
Read now
Unlock full access