percent-1.2.0

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
FILES
EXAMPLE
SEE ALSO
BUGS
AUTHOR
MANPAGE VERSION

NAME

percent − summarizes the most important occurences of a countsort output with percentages

SYNOPSIS

percent [ -r ]

DESCRIPTION

percent reads each lines from stdin, which should supposely be formated like the output of (1)countsort. percent summerizes all occurences and outputs a repartition of those whith percentages against the whole sum for each entry.

The first line of the output diplays the total number of occurences and the total number of entries in parenthesis.

The output might be sorted by decreasing occurences or the with initial order of input.

percent is almost never used with something else than countsort.

OPTIONS

-r

Do not sort by decreasing occurences, keep the initial input order.

FILES

none.

EXAMPLE

> echo ’a.a.a.b.b.c.c.c.c’ | tr ’.’ ’\n’ | countsort | percent 100 % 9 TOTAL (3 items) 1 44 % 4 c 2 33 % 3 a 3 22 % 2 b

> echo ’a.a.a.b.b.c.c.c.c’ | tr ’.’ ’\n’ | countsort | percent -r 100 % 9 TOTAL (3 items) 1 33 % 3 a 2 22 % 2 b 3 44 % 4 c

SEE ALSO

(1)countsort, (1)count, (1)revtail, (1)brev, (1)scramble.

BUGS

There are probably plenty. Please report them to bozomake@disjunkt.com

AUTHOR

Jean-Daniel Pauget (bozomake@disjunkt.com)

MANPAGE VERSION

$Id: percent.1.in 581 2010-04-08 21:42:14Z jd $