In addition, when it is used, the error index must be reset to -1 before each parse operation; otherwise the result can be misleading.
另外,使用它时,在每次解析操作前必须将错误索引重置为- 1;否则结果将可能产生误导。
2
You will need to reset OPTIND to 1 yourself if you call getopts for a new set of arguments in a script where you have already used it with other arguments.