>>13,19Actually, per POSIX, ignoring -- is the special case. Utilities should respect it otherwise specified.
Just use getopt. It's easy as piss. If you can't figure it out, please stop before any innocents fall victim to your incompetence.
>>18C programmers who don't use getopt should be gassed. There is nothing worse than having to check the source code of somebody's shitty custom parser when it fails.