Units: Units converter (meters, liters, inches, degrees, etc.) in the terminal

In the world we live in, there are many units of measurement, either to measure distances (kilometers, meters, etc.), such as weight (pounds, grams, etc.), temperatures (celsius, etc.), in short ... many different units of measurement. So is there any simple app that allows me to carry values ​​from one unit to another?

When I talk about simple, straightforward applications that do what's needed and nothing more, I always think of the terminal. That's why this time I'm bringing you a package called units , which will help you work with these units of measurement.

Installation:

To install this package, you already know, just search in your official units repository and install it:

On Debian, Ubuntu or derivatives:

sudo apt-get install units

In ArchLinux or derivatives:

sudo pacman -S units

Explanation of operation:

Now, units works with two values:

  • You have: What we have
  • You want: What we want

For example, let's say I want to know how many centimeters make a meter, so it would be:

  • You have: 1m
  • you want: cm

That is, I am 1 meter and I want to know how many centimeters make it up.

Another example ... I have 40 pounds of something, and I want to know how many kilograms is that, it would be:

  • You have: 40lb
  • You want: kg

Is this understood right? 

Using it ...

To use it we simply run it and the program will ask us exactly what I explained above, the program will ask what they have (You have) and what they want (You want), here is a screenshot showing how it works:

units-screenshot

As you can see, it works perfectly.

Keep in mind that the units of measurement have to be written in English, the program does not recognize Spanish at all

They can write lb as pounds, or put pounds (pounds means pounds in English), the same with the rest of the existing units.

Units is really useful, it covers many units of measurements, as well as we can work with times ... that is, suppose we want to add 2 hours and 10 minutes and know how many seconds there are in the result, it is as simple as:

You have: 2hr + 10min You want: sec * 7800 / 0.00012820513

The most complex units to write (at least for me) are those of temperature, because… if I want to calculate time for example, I know that hour is written hour and hr in miniature, see, simple to write, but degrees Fahrenheit or Celsius… well, a bit more complex ( in cases like this I understand why some may prefer to use a web tool like converterin that helps them convert Celsius to Fahrenheit ).

In case you want to use units, degrees Celsius has tempC as a 'diminutive' and degrees Fahrenheit has tempF. For example, I want to know how many degrees Fahrenheit are in 30 degrees Celsius:

You have: tempC (30) You want: tempF 86

As you can see, the place where I put the value to convert is different, in the case of temperatures I must enclose it in parentheses.

The end!

Well, this is where my post ends. Now you have a tool that, regardless of your desktop (Gnome, KDE, etc.), will help you convert and manage units of measurement 

Greetings and I hope you have found it useful


Add as preferred source in Google