Added getopt_test.c
This commit is contained in:
parent
b9a3e10334
commit
9bffdf2077
16
getopt_test.c
Normal file
16
getopt_test.c
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
|
int main(int argc, char* argv[]) {
|
||||||
|
int opt;
|
||||||
|
|
||||||
|
while ((opt = getopt(argc, argv, ";-a:")) != -1) {
|
||||||
|
switch (opt) {
|
||||||
|
default:
|
||||||
|
printf("%c", opt);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user