This will convert your number to a human readable value.
Try this with it.
for i in $(seq 1 1 64); do echo -n "$(echo "2^$i"|bc) = "; echo "2^$i"|bc|awk -f convert.awk; done
{ S=$1; Us=" kMGTPEZY"; U=""; i=2; while(S>1024){ S/=1024; U=substr(Us,i,1); i++; }; printf "%0.0f%sb\n", S, U }
No comments:
Post a Comment