The original units program has been a standard part of Unix since the early Bell Laboratories versions.
UDUNITS is a similar utility program, except that it has an additional programming library interface and date conversion abilities. UDUNITS is considered the de facto program and library for variable unit conversion for netCDF files.
Units will output the result of the conversion in two lines. Usually the first line (multiplication) is the desired result. The second line is the same conversion expressed as a division.
If you attempt to convert types of measurements that are incompatible units will print a conformability error message and display a reduced form of each measurement.
2083 units, 71 prefixes, 32 nonlinear units
You have: 10 furlongs
You want: miles
You have: 1 gallon + 3 pints
You want: quarts
You have: sqrt(miles^2)
Definition: 1609.344 m
% units 'ten furlongs per fortnight' 'kilometers per hour'
% units cup ounces