The Unidata units utility, udunits, supports conversion of unit specifications between formatted and binary forms, arithmetic manipulation of unit specifications, and conversion of values between compatible scales of measurement. A unit is the amount by which a physical quantity is measured. For example:
Physical Quantity Possible Unit
This utility works interactively and has two modes. In one mode, both an input and output unit specification are given, causing the utility to print the conversion between them. In the other mode, only an input unit specification is given. This causes the utility to print the definition -- in standard units -- of the input unit.