5 Invoking `units'
You invoke `units' like this:
units [OPTIONS] [FROM-UNIT [TO-UNIT]]
If the FROM-UNIT and TO-UNIT are omitted, then the program will use
interactive prompts to determine which conversions to perform. Note:
Interactive use. If both FROM-UNIT and TO-UNIT are given, `units'
will print the result of that single conversion and then exit. If only
FROM-UNIT appears on the command line, `units' will display the
definition of that unit and exit. Units specified on the command line
will need to be quoted to protect them from shell interpretation and to
group them into two arguments. Note: Command line use.
The following options allow you to read in an alternative units file,
check your units file, or change the output format:
Check that all units and prefixes defined in the units data file
reduce to primitive units. Print a list of all units that cannot
be reduced. Also display some other diagnostics about suspicious
definitions in the units data file. Note that only definitions
active in the current locale are checked.
Like the `-check' option, this option prints a list of units that
cannot be reduced. But to help find unit definitions that cause
endless loops, it lists the units as they are checked. If `units'
hangs, then the last unit to be printed has a bad definition.
Note that only definitions active in the current locale are
Use the specified format for numeric output. Format is the same
as that for the printf function in the ANSI C standard. For
example, if you want more precision you might use `-o %.15g'.
Instruct `units' to load the units file `filename'. If `filename'
is the empty string (`-f ''') then the default units file will be
loaded. This enables you to load the default file plus a personal
units file. Up to 25 units files may be specified on the command
line. This option overrides the `UNITSFILE' environment variable.
Print out a summary of the options for `units'.
Causes `-' to be interpreted as a subtraction operator. This is
usually the default behavior.
Causes `-' to be interpreted as a multiplication operator when it
has two operands. It will as a negation operator when it has only
one operand: `(-3)'. Note that by default `-' is treated as a
Causes `*' to have the old style precedence, higher than the
precedence of division so that `1/2*3' will equal `6'.
Forces `*' to have the new (default) precedence which follows the
usual rules of algebra: the precedence of `*' is the same as the
precedence of `/', so that `1/2*3' will equal `3/2'.
Give compact output featuring only the conversion factor. This
turns off the `--verbose' option.
Suppress prompting of the user for units and the display of
statistics about the number of units loaded.
Suppress conversion of units to their reciprocal units. For
example, `units' will normally convert hertz to seconds because
these units are reciprocals of each other. The strict option
requires that units be strictly conformable to perform a
conversion, and will give an error if you attempt to convert hertz
Give only one line of output (the forward conversion). Do not
print the reverse conversion. Note that if a reciprocal
conversion is performed then `units' will print still print the
"reciprocal conversion" line.
Give terse output when converting units. This option can be used
when calling `units' from another program so that the output is
easy to parse. This option has the combined effect of these
options: `--strict' `--quiet' `--one-line' `--compact'.
Give slightly more verbose output when converting units. When
combined with the `-c' option this gives the same effect as
Print program version number, tell whether the readline library
has been included, and give the location of the default units data
automatically generated by info2www version 18.104.22.168