: # this example detects flags in the command line arguments # without the list, the command line arguments are used for clarg do case $clarg in -*) echo The argument \"$clarg\" is an option flag ;; *) echo the argument \"$clarg\" is not an option flag ;; esac done