From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10d4db,b176264a56e1c82c,start X-Google-Attributes: gid10d4db,public X-Google-ArrivalTime: 2001-10-28 18:00:33 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!sjcppf01.usenetserver.com!usenetserver.com!news.alt.net!cola.stump.algebra.com!robomod!not-for-mail From: Bob Camp Newsgroups: comp.os.linux.announce Subject: bash-getopts-0.2.2 Date: Sun, 28 Oct 2001 19:49:54 CST Organization: Altopia Corp. - Usenet Access - http://www.altopia.com Message-ID: <200110212349.XAA22419@hadron.demon.co.uk> Return-Path: X-COLA-Policy: http://stump.algebra.com/~cola X-COLA-Info-1: Send submissions to cola@stump.algebra.com X-COLA-Info-2: Send complaints to cola-admin@stump.algebra.com X-Comment: moderators do not necessarily agree or disagree with this article. X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov) X-Authentication-Warning: hadron.demon.co.uk: bob set sender to bob@hadron.demon.co.uk using -f X-Auth: PGPMoose V1.1 PGP comp.os.linux.announce iQBVAwUAO9y1xCFvAtx2nXvNAQFsxwH/WO33R64LGU1TaNZbAFiL6a4b9+aeCsbP Be5R/LSK3IwpHTApQeIzcxfwatMo8Pn7OcI4UncWNmDnceYjOx2E0w== =bSah Xref: archiver1.google.com comp.os.linux.announce:1383 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 -, -- 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/ # ##########################################################################