MPE/iX Shell and Utilities Reference Manual, Vol 1

getopts(1) MPE/iX Shell and Utilities getopts(1)
ENVIRONMENT VARIABLES
getopts uses the following environment variables:
OPTARG
stores the value of the option argument found by getopts
OPTIND
contains the index of the next argument to be processed.
DIAGNOSTICS
Possible exit status values are:
0 getopts found a script command line with the form of an option. This happens
whether or not it recognizes the option.
1 getopts reached the end of the options, or an error occurred.
Message
Because this utility is built into the
MPE/iX Shell, see the sh(1) man page for a complete list of
error messages that you may receive when using it.
PORTABILITY
POSIX.2. x/OPEN Portability Guide 4.0.
On UNIX systems, getopts is built into both the KornShell and Bourne Shell.
NOTE
This command is built into the shell.
MPE/iX NOTES
The current release of
MPE/iX uses the INFO string to pass arguments to programs. If the size
of this string plus the size of the current environment (determined by the number and size of
the environment variables in the current process) is greater than 8192 bytes, the string is too
long to pass to a subprocess and the process creation fails.
SEE ALSO
sh(1), getopt(1)
1-258 Commands and Utilities