#! /bin/bash echo "hello world" function help(){ echo "this is a help cmd." } function close(){ echo "this is a close cmd." } case $1 in "-h") help ;; "-c") close;; *) ;; esac