I'm attempting to write a script to process options that might be combined; e.g.,
which designates the three options a, b, and c. I've found a number of getopts tutorials that explain how getopts works: it keeps track of where it is in the parsing by storing the next index in the variable OPTIND. This explanation is satisfactory in the situation where the options are all in separate words, but how does it know where it left off when processing a word like -abc with multiple options?
By testing with my own scripts, I've verified that OPTIND does not change after processing the first of the multiple options. I examined all the bash variables (using set), but I can't find any variable which could be responsible.