This is modestly complicated. The fastest way is also unreliable:
case "$*" in (*-h*) echo "Has -h";; esac
Unfortunately, this also indicates " command this-here " as having " -h ".
Normally you should use getopts to parse the arguments you expect:
while getopts habcf: opt do case "$opt" in (h) echo "Has -h";; ([abc]) echo "Got -$opt";; (f) echo "File: $OPTARG";; esac done shift (($OPTIND - 1))
Etc.
Jonathan leffler
source share