diff options
Diffstat (limited to 'java/rasj/test/count.sh')
-rw-r--r-- | java/rasj/test/count.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/java/rasj/test/count.sh b/java/rasj/test/count.sh new file mode 100644 index 0000000..83b7ece --- /dev/null +++ b/java/rasj/test/count.sh @@ -0,0 +1,11 @@ +#!/bin/bash + + +awk < $1 ' +BEGIN { COUNT=0; MIN=1000; MAX=0; SMALL=0; LARGE=0;} + { COUNT++; + if ($6>1000) LARGE++; else SMALL++; + if ($6>MAX) MAX = $6; + if ($6<MIN) MIN = $6; + } +END { printf("count=%d, small=%d, large=%d, min=%d, max=%d, percent=%f\n", COUNT, SMALL, LARGE, MIN, MAX, LARGE/COUNT*100 ); } ' |