5 int main (int argc, char **argv)
13 while ((c = getopt (argc, argv, "abc:")) >= 0)
26 fprintf (stderr, "Unknown option %c.\n", optopt);
28 fputs ("Unknown option.\n", stderr);
32 fprintf (stderr, "This should never happen!\n");
36 printf ("aflag = %d, bflag = %d, cvalue = %s\n", aflag, bflag, cvalue);
38 for (index = optind; index < argc; index++)
39 printf ("Non-option argument %s\n", argv[index]);