bash shell example

#!/bin/bash

#comment
: << COMMENT
 ANY COMMENT HERE
COMMENT

#full command
declare -A cmd=(
  [clean]="--clean"
  [help]="--help"
)
#short command
declare -A scmd=(
  [clean]="-c"
  [help]="-h"
)

takes_ary_as_arg()
{
  declare -a argAry1=("${!1}")
  echo "${argAry1[@]}"
}

usage()
{
  takes_ary_as_arg cmd[@]
  echo "usage: test.sh [options]"
  echo "options : ${cmd[@]}"
}

case $1 in
  ${scmd[clean]} | ${cmd[clean]} )
    //todo
  ;;
  ${scmd[help]} | ${cmd[help]} )
    echo ${cmd[help]}
  ;;
  * )
    usage $cmd
    exit 1
esac