Next: Localization, Previous: Defining Your Own Units, Up: Top [Contents][Index]
• Format Specification: | The output format specification | |
• Flags: | Optional format flags | |
• Field Width: | Specifying output field width | |
• Precision: | Specifying output precision |
By default, units
shows results to eight significant
digits. You can change this with the --exponential,
--digits, and --output-format options. The first
sets an exponential format (i.e., scientific notation) like that used
in the original Unix units
program, the second allows you to
specify a different number of significant digits, and the last allows
you to control the output appearance using the format for the
printf()
function in the C programming language. If you only
want to change the number of significant digits or specify exponential
format type, use the --digits and --exponential
options. The --output-format option affords the greatest
control of the output appearance, but requires at least rudimentary
knowledge of the printf()
format syntax. See Invoking Units,
for descriptions of these options.