SUMARY: ksh options help
- From: Dave Markham <dave.markham@xxxxxxxxxx>
- Date: Tue, 30 Jan 2007 17:42:43 +0000
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
- Prev by Date: pci adapter (usb) +
- Next by Date: Building a raid-10 volume in Disksuite (Solaris 8)
- Previous by thread: pci adapter (usb) +
- Next by thread: Building a raid-10 volume in Disksuite (Solaris 8)
- Index(es):
Relevant Pages
|