histogram: man page fixups.

This commit is contained in:
Ole Tange 2014-03-17 00:26:36 +01:00
parent e900b8c31a
commit b55e33f4bc
2 changed files with 15 additions and 3 deletions

View file

@ -51,6 +51,8 @@ One comma separated header+value per line: (echo a,1; echo b,1.01; echo c,3.1) |
=head1 OPTIONS =head1 OPTIONS
=over 9
=item B<--delimiter> I<delim> =item B<--delimiter> I<delim>
=item B<-d> I<delim> =item B<-d> I<delim>
@ -67,6 +69,8 @@ Take the logarithm of all values.
=item B<--input> I<input_format> =item B<--input> I<input_format>
=item B<-i> I<input_format>
Give format of input. B<histogram> will try to guess the input format Give format of input. B<histogram> will try to guess the input format
based on different heuristics. If it guesses wrong, you can override based on different heuristics. If it guesses wrong, you can override
it with B<--input>. I<input_format> is a string consisting of: it with B<--input>. I<input_format> is a string consisting of:
@ -117,9 +121,11 @@ Column 1 is ignored, column 2 is header, column 3 is value, guess separator.
=item B<--format> I<output_format> =item B<--format> I<output_format>
=item B<-f> I<output_format>
Give format of output. I<output_format> is a string consisting of: Give format of output. I<output_format> is a string consisting of:
=over 13 =over 5
=item Z<>B<b> =item Z<>B<b>
@ -366,6 +372,10 @@ if($#ARGV != -1) {
} else { } else {
@raw = (<>); @raw = (<>);
chomp @raw; chomp @raw;
if(not @raw) {
# Empty input
exit;
}
} }

View file

@ -21,9 +21,11 @@ echo "## 1,a 2,b command line"
histogram 1,a 2,b histogram 1,a 2,b
echo "## 1 2 3 4 command line" echo "## 1 2 3 4 command line"
histogram 1 2 3 4 histogram 1 2 3 4
echo "## a 1 b 2 c 3 command line" echo "## a 1 b 2 c 3 command line - not ideal"
histogram a 1 b 2 c 3 histogram a 1 b 2 c 3
echo "## "a a":1 b:2 c:3 command line" echo '## "a a":1 b:2 c:3 command line'
histogram "a a":1 b:2 c:3 histogram "a a":1 b:2 c:3
echo "## null input"
histogram </dev/null
(echo 150 hundredfifty;echo 30 thirty;echo 3 three;echo 6 six) | histogram --format vbH (echo 150 hundredfifty;echo 30 thirty;echo 3 three;echo 6 six) | histogram --format vbH