: # without the list, the command line arguments are used for clarg do dash=`expr $clarg : "\-"` echo Test $0: $clarg $dash # check if dash is 1 ; the current6 argument is an option flag if [ $dash -eq 1 ] then echo The argument \"$clarg\" is an option flag else echo the argument \"$clarg\" is not an option flag fi done