If the option has an optional argument, it Firstly, according to the code getopts argument list (:s:dvu:p:n:), -s, -u, -p, and -n take a mandatory argument. The first argument you pass to getopts is a list of which letters (or numbers, or any other single character) it will accept. Therefore, in this case, it will have a value of 5 when it will reach the last element, which is hello, the mandatory argument required by the -a option. .) optional_argument 2 The option's argument is optional. The type of argument… The getopt module is the original command line option parser that supports the conventions established by the Unix function getopt.It parses an argument sequence, such as sys.argv and returns a sequence of tuples containing (option, argument) pairs and a sequence of non-option arguments. If an option character:: 1. getopts is a built-in Unix shell command for parsing command-line arguments. If getopts is silent, then a colon (:) is placed in name and OPTARG While the getopt system tool can vary from system to system, bash getopts is defined by the POSIX standard. The predecessor to getopts was the external program getopt by Unix System Laboratories. Option values are the first argument after the string. If the option has a required argument, it may be written directly after the long option name, separated by `=’, or as the next argument (ie. with a getopts line in my script of getopts p:cs opt a command line of