shortopt

syntax: (shortoptoptactionarg?desc)parameter: opt - The single letter optionparameter: action - The code to execute when the option is foundparameter: arg? - nil if the option doesn't take an argument, otherwise a string that describes the type of argument the option takes.parameter: desc - A string that describes the option. This is used by the usage function.Example:

longopt

syntax: (longoptoptactionarg?desc)parameter: opt - The long optionparameter: action - The code to execute when the option is foundparameter: arg? - nil if the option doesn't take an argument, otherwise a string that describes the type of argument the option takes.parameter: desc - A string that describes the option. This is used by the usage function.Example:

getopts:arg

syntax: getopts:arg

The variable getopts:arg holds the argument to the option, for those options
which take an argument. This is useful inside the action code, so you can make
use of the argument. For instance, --prefix=/usr/bin on the command line, would
leave the value /usr/bin in getopts:arg, and your action code could store the
value or act on it in some other way.

§

getopts:usage

syntax: (getopts:usage)

return: Exits script with a value of 0

Prints out every command line option that has been registered with the getopts module.