SUMARY: ksh options help



Thanks to vladimir, john, ceri, ric, christopher, brad, matthew

People were mentioning to use getopts which i had looked at, but the
result which seems to work nicely is to use a case within a case.

Specifically mathew stier and Ric Anderson suggested this :-

-config_file)
## Below is getting messy. Look at getopts ##
case "$2" in
''|-*)
usage
exit 1
;;
esac
shift
config_file=$1
;;


and

-config_file)
case "$2" in
-* | "" )
usage;
exit 1;
;;
* )
shift;
config_file=$1;
;;
esac
;;


work :)
_______________________________________________
sunmanagers mailing list
sunmanagers@xxxxxxxxxxxxxxx
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



Relevant Pages