Jari Aalto | d166f04 | 1997-06-05 14:59:13 +0000 | [diff] [blame] | 1 | getopts: usage: getopts optstring name [arg] |
| 2 | 2 |
| 3 | getopts: usage: getopts optstring name [arg] |
| 4 | 2 |
Jari Aalto | 7117c2d | 2002-07-17 14:10:11 +0000 | [diff] [blame] | 5 | ./getopts.tests: line 10: getopts: -a: invalid option |
Jari Aalto | d166f04 | 1997-06-05 14:59:13 +0000 | [diff] [blame] | 6 | getopts: usage: getopts optstring name [arg] |
| 7 | -a specified |
| 8 | -b bval specified |
| 9 | remaining args: one two three |
| 10 | -a specified |
| 11 | -b bval specified |
| 12 | remaining args: one two three four five six seven eight nine ten eleven twelve |
Jari Aalto | cce855b | 1998-04-17 19:52:44 +0000 | [diff] [blame] | 13 | ./getopts1.sub: option requires an argument -- b |
| 14 | Usage: ./getopts1.sub [-a] [-b value] args |
Jari Aalto | d166f04 | 1997-06-05 14:59:13 +0000 | [diff] [blame] | 15 | -a specified |
| 16 | -c cval specified |
| 17 | -d specified |
| 18 | -a specified |
| 19 | -b 3 specified |
| 20 | remaining args: one two three four five |
| 21 | -a specified |
| 22 | -b bval specified |
| 23 | remaining args: one two three |
| 24 | -a specified |
| 25 | -b bval specified |
| 26 | remaining args: one two three |
Jari Aalto | cce855b | 1998-04-17 19:52:44 +0000 | [diff] [blame] | 27 | ./getopts4.sub: error: option `b' requires an argument |
| 28 | Usage: ./getopts4.sub [-a] [-b value] args |
| 29 | ./getopts4.sub: error: illegal option character `c' |
| 30 | Usage: ./getopts4.sub [-a] [-b value] args |
Jari Aalto | d166f04 | 1997-06-05 14:59:13 +0000 | [diff] [blame] | 31 | -a specified |
| 32 | remaining args: -b bval one two three |
| 33 | OPTERR=0 |
| 34 | a here |
| 35 | something else here |
| 36 | OPTIND=3 |
| 37 | getop: OPTERR=1 |
| 38 | a here |
Jari Aalto | cce855b | 1998-04-17 19:52:44 +0000 | [diff] [blame] | 39 | ./getopts5.sub: illegal option -- c |
Jari Aalto | d166f04 | 1997-06-05 14:59:13 +0000 | [diff] [blame] | 40 | something else here |
Jari Aalto | cce855b | 1998-04-17 19:52:44 +0000 | [diff] [blame] | 41 | ./getopts5.sub: illegal option -- d |
Jari Aalto | d166f04 | 1997-06-05 14:59:13 +0000 | [diff] [blame] | 42 | something else here |
Jari Aalto | cce855b | 1998-04-17 19:52:44 +0000 | [diff] [blame] | 43 | ./getopts5.sub: illegal option -- e |
Jari Aalto | d166f04 | 1997-06-05 14:59:13 +0000 | [diff] [blame] | 44 | something else here |
| 45 | getop: OPTIND=5 |
| 46 | OPTIND=3 |
| 47 | OPTERR=0 |
| 48 | -a specified |
| 49 | remaining args: |
| 50 | -a specified |
| 51 | remaining args: |
| 52 | -a specified |
| 53 | remaining args: |
| 54 | 0 |
Jari Aalto | 7117c2d | 2002-07-17 14:10:11 +0000 | [diff] [blame] | 55 | ./getopts7.sub: line 4: getopts: `opt-var': not a valid identifier |
Jari Aalto | d166f04 | 1997-06-05 14:59:13 +0000 | [diff] [blame] | 56 | remaining args: |