#!/bin/ksh
# Script name: opts3
# Example 10.139

# Using getopts -- Third try --
while getopts :d options
do
    case $options in
	d) print -R "-d is the ON switch";;
	+d) print -R "+d is the OFF switch";;
	\?) print $OPTARG is not a valid option;;
    esac
done
