Removed local statement, replaced with unset at end of function
Removed getop call as the OmniOS/Solaris version is the POSIX version, not GNU. Replaced with parsing of the bare command line. Yikes.