C getopt multiple value
I know this is quite old but I came across this in my search for a solution. while((command = getopt(argc, argv, “a:”)) != -1){ switch(command){ case ‘a’: (…) optind–; for( ;optind < argc && *argv[optind] != ‘-‘; optind++){ DoSomething( argv[optind] ); } break; } I found that int optind (extern used by getopt() ) points … Read more