Commit | Line | Data |
---|---|---|
c17be636 SK |
1 | #! /bin/sh |
2 | ||
3 | set -e | |
4 | ||
5 | awk ' | |
6 | { | |
7 | v = val[NR] = $1 | |
8 | key[NR] = $2 | |
9 | if (v > max) | |
10 | max = v | |
11 | } | |
12 | ||
13 | END { | |
14 | for (i = 1; i <= NR; i++) { | |
15 | printf "%s ", key[i] | |
16 | for (j = 1; j <= (val[i] * 100) / max; j++) { | |
17 | printf "|" | |
18 | } | |
19 | printf "\n" | |
20 | } | |
21 | }' \ | |
22 | | column -t |