command line parsing with bash

Just found this page about command line parsing with bash. And wanted to keep it around as a reference. But I wanted to share it also.
So here is the pointer to the original page.