Convert parse_option to sh, use Perl instead of awk, implement --help.

This commit is contained in:
Daniel Nichter
2011-12-19 12:51:47 -07:00
parent 3266e0aeca
commit 9baea8b7b6
4 changed files with 104 additions and 56 deletions

View File

@@ -0,0 +1,30 @@
Usage: pt-stalk [OPTIONS] [-- MYSQL_OPTIONS]
For more information, 'man pt-stalk' or 'perldoc /Users/daniel/p/bash-tool-libs/t/lib/samples/bash/po001.sh'.
Command line options:
--help
Print help and exit.
--int-opt
Int option without a default.
--int-opt2
Int option with a default.
--noption
Negatable option.
--string-opt
String option without a default.
--string-opt2
String option with a default.
--typeless-option
Just an option.
--version
Print tool's version and exit.

View File

@@ -110,11 +110,13 @@ Just an option.
default: yes; negatable: yes
Negatable option.
=item --int-opt
type: int
Int option without a default
Int option without a default.
=item --int-opt2
@@ -128,6 +130,10 @@ short form: -v
Print tool's version and exit.
=item --help
Print help and exit.
=back
=head1 ENVIRONMENT