Bash parameter parsing template.

dohelp()
{
  echo "Example script"
  echo ""

  # Exit because you don't want the script to do anything after displaying help
  exit
}

while [ -n "$*" ]; do
  flag=$1
  value=$2

  case "$flag" in
    "--one")
      one=$value
      shift
    ;;
    "--two")
      two=$value
      shift
    ;;
    "--pretend")
      pretend=true
    ;;
    "--help")
      dohelp
    ;;
    "--")
      break
    ;;
    *)
      echo -e "unknown option $flag\n"
      dohelp
    ;;
  esac

  shift
done