Getopts

getopts
Developer(s)Various open-source and commercial developers
Initial release1986; 38 years ago (1986)
Operating systemUnix, Unix-like, IBM i
TypeCommand

getopts is a built-in Unix shell command for parsing command-line arguments. It is designed to process command line arguments that follow the POSIX Utility Syntax Guidelines, based on the C interface of getopt.

The predecessor to getopts was the external program getopt by Unix System Laboratories.