Comment

Comment by majewsky

Since the article mentions numfmt(1), I'm surprised that no one mentioned units(1) yet. I use it all the time to convert units.

  $ units '4123412312312 bytes' 'tebibytes'
          4123412312312 bytes = 3.7502217 tebibytes
          4123412312312 bytes = (1 / 0.26665091) tebibytes
  $ units "50 miles per gallon" "liters per 100 kilometers"
          reciprocal conversion
          1 / 50 miles per gallon = 4.7042917 liters per 100  kilometers
          1 / 50 miles per gallon = (1 / 0.21257185) liters per 100 kilometers
parent majewsky 9 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton