aboutsummaryrefslogtreecommitdiff
path: root/bkt
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2015-10-14 15:06:56 -0400
committerB. Watson <yalhcru@gmail.com>2015-10-14 15:06:56 -0400
commit8d7c816f6cbd71485d96511ad9abda78dd179d98 (patch)
treebf4d72b0abfaaa589187e94e3be0bb9264970f19 /bkt
parent28e0541c2b6c82f62a489be77a13e09644622e52 (diff)
downloadmisc-scripts-8d7c816f6cbd71485d96511ad9abda78dd179d98.tar.gz
bkt: improve description
Diffstat (limited to 'bkt')
-rwxr-xr-xbkt18
1 files changed, 11 insertions, 7 deletions
diff --git a/bkt b/bkt
index df949d8..608ce67 100755
--- a/bkt
+++ b/bkt
@@ -16,9 +16,10 @@ B<bkt> -[cpiwWtxaBPnkFL] [...] [-e code] [-d delim ] [-f field] [-b list]
=head1 DESCRIPTION
-B<bkt> reads input from files or standard input, optionally transforms
-it according to various options, and counts like inputs. After all input
-is read, a count is given for the occurrence of each input.
+B<bkt> reads input from files or standard input, splits it into records,
+optionally transforms them according to various options, and counts like
+records. After all input is read, a count and percentage is given for
+the occurrence of each record.
Given the following input:
@@ -34,10 +35,13 @@ B<bkt> will output:
baz 1 20.0%
foo 2 40.0%
-The name 'B<bkt>' comes from the concept of collecting like items in
-buckets. The original plan was to name this script 'bucketize', but who
-wants to type all that? Also, purely to support lazy typists, B<bkt>
-implements subsets of the functionality of B<cut>(1) and B<sort>(1).
+The name 'B<bkt>' comes from the concept of collecting like items
+in buckets. The original plan was to name this script 'bucketize',
+but who wants to type all that? Also, purely to support lazy typists,
+B<bkt> implements subsets of the functionality of B<cut>(1), B<sort>(1),
+B<grep>(1), and B<head>(1). B<bkt> also allows executing arbitrary perl
+code for each record, and supports various output options, including an
+ASCII art histogram.
The utility of B<bkt> will be obvious, if you've written lots of
variants of: