getopt(s)—parses command line options

The getopts command supercedes getopt. getopts is used to break up options in command lines for easy parsing by shell procedures and to check for legal options. (See getopts, in Chapter 9.)

Get Linux Shells 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.