From: Bob Camp <bob@hadron.demon.co.uk>
Subject: bash-getopts-0.2.2
Date: Sun, 28 Oct 2001 19:49:54 CST [thread overview]
Message-ID: <200110212349.XAA22419@hadron.demon.co.uk> (raw)
If your ten liner bash scripts have a habit of evolving into full blown
applications then this may be of interest to you.
bash-getopts-0.2.2
------------------
This is a fully self contained options parser for bash. It supports:
-c, -x arg, -xarg, -abc, -abx arg, -abxarg,
--long, --long arg, --long=arg,
-long, -long arg, -long=arg
key, key arg, key=arg
-, -- <end of options>
Optional command line permuting.
Optional and required arguments with checking.
Aliases for all option types.
Integral help.
Integral version reporting.
Optional logical, --flag, --not-flag.
Optional shortest unambiguous match.
Optional case insensitive match.
Optional underscore and hyphen equivalence.
To use it, define your options, exactly as they appear on the command line,
as a case statement inside a function (details later). Then source or
paste in the options parsing code.
Key features of the parser are:
Error checking and reporting. If an error occurs then the parser will
not pass control back to the main program but will exit with an error
code.
If only help or version information is required then control will not
return to the main program but will exit true.
The parser has an extensive test suite.
Latest version of the sources can be obtained from:
www.hadron.demon.co.uk/freeware.html
Copying
-------
This software and documentation is Copyright Bob Camp 2000, 2001 and issued
as freeware under the GNU General Public Licence. It comes with absolutely
no warranty. It is used entirely at the user's own risk. See the enclosed
'COPYING' file for full details.
Bob Camp
--
Cygnus Technical Consulting
Analogue and Digital IC Design.
bob@hadron.demon.co.uk
http://www.hadron.demon.co.uk/
##########################################################################
# Send submissions for comp.os.linux.announce to: cola@stump.algebra.com #
# PLEASE remember a short description of the software and the LOCATION. #
# This group is archived at http://stump.algebra.com/~cola/ #
##########################################################################
reply other threads:[~2001-10-29 1:49 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox