blob: 92261038ace34b38b310994b736ea3c1c7231409 [file] [log] [blame]
Jari Aaltod166f041997-06-05 14:59:13 +00001getopts: usage: getopts optstring name [arg]
22
3getopts: usage: getopts optstring name [arg]
42
Jari Aalto7117c2d2002-07-17 14:10:11 +00005./getopts.tests: line 10: getopts: -a: invalid option
Jari Aaltod166f041997-06-05 14:59:13 +00006getopts: usage: getopts optstring name [arg]
7-a specified
8-b bval specified
9remaining args: one two three
10-a specified
11-b bval specified
12remaining args: one two three four five six seven eight nine ten eleven twelve
Jari Aaltocce855b1998-04-17 19:52:44 +000013./getopts1.sub: option requires an argument -- b
14Usage: ./getopts1.sub [-a] [-b value] args
Jari Aaltod166f041997-06-05 14:59:13 +000015-a specified
16-c cval specified
17-d specified
18-a specified
19-b 3 specified
20remaining args: one two three four five
21-a specified
22-b bval specified
23remaining args: one two three
24-a specified
25-b bval specified
26remaining args: one two three
Jari Aaltocce855b1998-04-17 19:52:44 +000027./getopts4.sub: error: option `b' requires an argument
28Usage: ./getopts4.sub [-a] [-b value] args
29./getopts4.sub: error: illegal option character `c'
30Usage: ./getopts4.sub [-a] [-b value] args
Jari Aaltod166f041997-06-05 14:59:13 +000031-a specified
32remaining args: -b bval one two three
33OPTERR=0
34a here
35something else here
36OPTIND=3
37getop: OPTERR=1
38a here
Jari Aaltocce855b1998-04-17 19:52:44 +000039./getopts5.sub: illegal option -- c
Jari Aaltod166f041997-06-05 14:59:13 +000040something else here
Jari Aaltocce855b1998-04-17 19:52:44 +000041./getopts5.sub: illegal option -- d
Jari Aaltod166f041997-06-05 14:59:13 +000042something else here
Jari Aaltocce855b1998-04-17 19:52:44 +000043./getopts5.sub: illegal option -- e
Jari Aaltod166f041997-06-05 14:59:13 +000044something else here
45getop: OPTIND=5
46OPTIND=3
47OPTERR=0
48-a specified
49remaining args:
50-a specified
51remaining args:
52-a specified
53remaining args:
540
Jari Aalto7117c2d2002-07-17 14:10:11 +000055./getopts7.sub: line 4: getopts: `opt-var': not a valid identifier
Jari Aaltod166f041997-06-05 14:59:13 +000056remaining args: