view bin/char-hist @ 6:a6d23e7fab01 default tip

final, all sigs on multiple pages
author Henry S. Thompson <ht@inf.ed.ac.uk>
date Thu, 08 Oct 2026 12:51:14 +0100
parents 2aa53823fb21
children
line wrap: on
line source

#!/bin/perl
# frequency table of characters
while (<>) {
    grep($cc[$_]++,unpack("C*",$_));
};
for ($i=0;$i<128;$i++) {
    printf("%d %s %d\n",$i,$i>32?sprintf("%c",$i):sprintf("^%c",$i+64),$cc[$i]);
};