Command Line Unit Conversion Utility

I found a handy tool for figuring out unit conversions quickly, and yes I am aware that Google does this, but sometimes the command line is more convenient. Here are some examples of how to use it:

$ units lightyear parsec
       * 0.30660139
        / 3.2615638

$ units inches feet
        * 0.08333333
        / 12

$ units 2m cm
        * 200
        / 0.005

So the first line tells you what value to multiply the second unit by to make the conversion. And the second line is the inverse operation, that is, what you divide the second unit by to obtain the same value in the first unit.

To install this on a Debian/Ubuntu system, just run the following command:

$ sudo apt-get install units
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s