Processing multiple values for one single option using getopt/optparse?
问题 Is it possible to fetch multiple values for one option using getopt or optparse, as shown in the example below: ./hello_world -c arg1 arg2 arg3 -b arg4 arg5 arg6 arg7 Please note that the number of actual values for each option (-c, -b) could be either 1 or 100. I do not want to use: ./hello_world -c "arg1 arg2 arg3" -b "arg4 arg5 arg6 arg7" It seems to me that this may not be possible (and perhaps in violation of POSIX), please correct me if I'm wrong. I've seen examples where all the non