holman / spark

▁▂▃▅▂▇ in your shell.
http://zachholman.com/spark/
MIT License
6.01k stars 290 forks source link

Data of same numerical value generates bar of different length #61

Closed santosh closed 11 years ago

santosh commented 11 years ago

spark 010 10 generates a graph like

▁█

which seems to be bug because both equals ten.

markusfisch commented 11 years ago

Actually that's a feature since 010 is interpreted as octal number because of the 0 prefix. See man bash for more info about that or just try:

echo $(( 010 ))

Which gives 8 decimal.

holman commented 11 years ago

It's a strange feature, to be sure, but I'm going to stick with it for now.