- 论坛徽章:
- 0
|
If an option-argument is missing:
* If the first character of optstring is a colon, the shell variable specified by name shall be set to the colon character and the shell variable OPTARG shall be set to the option chara
acter found.
* Otherwise, the shell variable specified by name shall be set to the question-mark character, the shell variable OPTARG shall be unset, and a diagnostic message shall be written to
standard error. This condition shall be considered to be an error detected in the way arguments were presented to the invoking application, but shall not be an error in getopts proa
cessing; a diagnostic message shall be written as stated, but the exit status shall be zero.
ctrl+c ctrl+v |
|