getopts.right

来自「android-w.song.android.widget」· RIGHT 代码 · 共 57 行

RIGHT
57
字号
getopts: usage: getopts optstring name [arg]2getopts: usage: getopts optstring name [arg]2./getopts.tests: line 10: getopts: -a: invalid optiongetopts: usage: getopts optstring name [arg]-a specified-b bval specifiedremaining args: one two three-a specified-b bval specifiedremaining args: one two three four five six seven eight nine ten eleven twelve./getopts1.sub: option requires an argument -- bUsage: ./getopts1.sub [-a] [-b value] args-a specified-c cval specified-d specified-a specified-b 3 specifiedremaining args: one two three four five-a specified-b bval specifiedremaining args: one two three-a specified-b bval specifiedremaining args: one two three./getopts4.sub: error: option `b' requires an argumentUsage: ./getopts4.sub [-a] [-b value] args./getopts4.sub: error: illegal option character `c'Usage: ./getopts4.sub [-a] [-b value] args-a specifiedremaining args: -b bval one two threeOPTERR=0a heresomething else hereOPTIND=3getop: OPTERR=1a here./getopts5.sub: illegal option -- csomething else here./getopts5.sub: illegal option -- dsomething else here./getopts5.sub: illegal option -- esomething else heregetop: OPTIND=5OPTIND=3OPTERR=0-a specifiedremaining args: -a specifiedremaining args: -a specifiedremaining args: 0./getopts7.sub: line 4: getopts: `opt-var': not a valid identifierremaining args: 

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?