numfmt
v(uutils coreutils) 0.1.0
Options
--delimiter=<X>
,-d <X>
-
numfmt-help-delimiter
--field=<FIELDS>
-
numfmt-help-field
--format=<FORMAT>
-
numfmt-help-format
--from=<UNIT>
-
numfmt-help-from
--from-unit=<N>
-
numfmt-help-from-unit
--to=<UNIT>
-
numfmt-help-to
--to-unit=<N>
-
numfmt-help-to-unit
--padding=<N>
-
numfmt-help-padding
--header=<N>
-
numfmt-help-header
--round=<METHOD>
-
numfmt-help-round
--suffix=<SUFFIX>
-
numfmt-help-suffix
--invalid=<INVALID>
-
numfmt-help-invalid
--zero-terminated
,-z
-
numfmt-help-zero-terminated
Examples
Convert 1.5K (SI Units) to 1500:
numfmt --from si 1.5K
Convert 5th field (1-indexed) to IEC Units without converting header:
ls -l | numfmt --header=1 --field 5 --to iec
Convert to IEC units, pad with 5 characters, left aligned:
du {{[-s|--summarize]}} * | numfmt --to iec --format "%-5f"
The examples are provided by the tldr-pages project under the CC BY 4.0 License.
Please note that, as uutils is a work in progress, some examples might fail.