#!/bin/rc
rfork e
if (~ $#* 0) {
echo 'usage: '$0' n [n...]' >[1=2]
exit usage
}
s=`{echo $* | tr \x20 \x0a | sort -n}
min=$s(1)
max=$s($#s)
e=`{echo 'int((xxx - min) / ((max - min)/8))' | sed 's/max/'$max'/g; s/min/'$min'/g'}
nl='
'
echo $* | tr \x20 \x0a | sed 's/.*/xxx=&/g; a\'$nl$"e | hoc |
tr -d ' '$nl |
tr 012345678 ▁▂▃▄▅▆▇██
echo
|