More fun with awk

#!/usr/bin/ksh
ls -l $@ | awk '
/^-/ {
l = 5*log($5)
h = sprintf("%7d %-72s",$5,$8)
print "\x1B[7m" substr(h,1,l) "\x1B[27m" substr(h,l+1)
}
'

ls command with histogram of file sizes.
The histogram scale is logaritmic, to avoid very short bars for smaller files or very long bars for bigger files.

Screenshot:

Good one, am just adding few changes

ls -l $@ to ls -l
adding filename to the historgram, adding more meaning
ls -l | awk '
/^-/ {
l = 5*log($5)
h = sprintf("%7d %-72s", $5, $8)
print "\x1B[7m" substr(h,1,l) "\x1B[27m" substr(h,l+1), $9
}
'

Why?
$@ was there to replicate for ls the arguments given to the command hls, so that you can say for example:
hls -rS /bin/*

I was using ls from Debian Linux, $5 was the size and $8 was the filename.
Now I am on Solaris (different output)... can't see any $9 in the output of ls -l.
What field is $9?

$9 is the file name.

Good work colemar.

this is what am saying is not needed at all, when the command is piped through the output of the command will be automatically piped through