Wikipedia
Getopt
getopt is a C library function used to parse command-line options.
It is also the name of a Unix program for parsing command line arguments in shell scripts.