Name

units

Synopsis

    units
    units [options] [from-unit to-unit]

Interactively supply a formula to convert a number from one unit to another. Use EOF to exit. Known units are maintained in a system table, and the GNU/Linux and Mac OS X versions let you supply your own units file. They also allow you to supply units on the command line, so that the program can be used in a batch fashion.

GNU/Linux and Mac OS X Common Options

-ffile, --file=file

Read units from file.

-q, --quiet, --silent

Do not prompt, and do not display statistics.

GNU/Linux Options

-c, --check

Verify that all units reduce to primitive units.

--check-verbose

Like -c, but list the units as they’re checked, for finding infinite loops.

-e, --exponential

Use exponential format output.

-h, --help

Print a command-line summary and exit.

-oformat, --output-format=format

Use printf(3)-style format format for formatting values. format should be appropriate for a floating-point value.

-s, --strict

Do not do the reciprocal unit conversion.

-v, --verbose

Be more verbose.

-V, --version

Print version information and exit.

Mac OS X Option

-v

Print the version number.

Get Unix in a Nutshell, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.