COHERENT manpages
This page displays the COHERENT manpage for units [Convert measurements].
List of available manpages
Index
units -- Command
Convert measurements
units [ -u ]
units is an interactive program that tells you how to convert one unit of
measurement into another. It prompts you for two quantities with the same
dimension (e.g., two measurements of weight, or two of size). It first
prints the prompt ``You have:'' to ask for the unit you wish to convert
from, and then prints the prompt ``You want:'' for the unit you wish to
convert to.
Example
The following example returns the formula for convert fortnights into days:
You have: fortnight
You want: days
* 14
/ 0.071428
The following fundamental units are recognized: meter, gram, second,
coulomb, radian, bit, unitedstatesdollar, sheet, candle, kelvin, and
copperpiece (shillings and pence).
A quantity consists of an optional number (default, 1) and a dimension
(default, none). Numbers are floating point with optional sign, decimal
part and exponent. Dimensions may be specified by fundamental or derived
units, with optional orders. A quantity is evaluated left to right: a
factor preceded by a `/' is a divisor, otherwise it is a multiplier. For
example, the earth's gravitational acceleration may be entered as any of
the following:
9.8e+0 m+1 sec-2
32 ft/sec/sec
32 ft/sec+2
British equivalents of US units are prefixed with br, e.g., brpint. Other
units include c (speed of light), G (gravitational constant), R (gas-law
constant), phi (golden ratio) % (1/100), k (1,024), and buck (United States
dollar).
/usr/lib/units is the ASCII file that contains conversion tables. The
binary file /usr/lib/binunits may be recreated by using the -u option.
Files
/usr/lib/units -- Known units
/usr/lib/binunits -- Binary encoding of units file
See Also
bc,
commands,
conv
Diagnostics
If the ASCII file /usr/lib/units has changed more recently than the binary
file /usr/lib/binunits, units prints a message and regenerates the binary
file before it continues; this can take up to a few minutes, depending upon
the speed of your system.
The error message ``conformability'' means that the quantities are not
dimensionally compatible, e.g., m/sec and psi. units prints each quantity
and its dimensions in fundamental units.
Notes
There are the inevitable name collisions: g for gram versus gee for Earth's
gravitational acceleration, exp for the base of natural logarithms versus e
for the charge of an electron, ms for (plural) meters versus millisecond,
and, of course, batman for the Persian measure of weight rather than the
Turkish.