The getopts command supersedes getopt. getopts is used to break up options in command lines for easy parsing by shell procedures and to check for legal options.