EnglishFrenchSpanish

OnWorks favicon

numfmt - Online in the Cloud

Run numfmt in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command numfmt that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

NAME


numfmt - Convert numbers from/to human-readable strings

SYNOPSIS


numfmt [OPTION]... [NUMBER]...

DESCRIPTION


Reformat NUMBER(s), or the numbers from standard input if none are specified.

Mandatory arguments to long options are mandatory for short options too.

--debug
print warnings about invalid input

-d, --delimiter=X
use X instead of whitespace for field delimiter

--field=FIELDS
replace the numbers in these input fields (default=1) see FIELDS below

--format=FORMAT
use printf style floating-point FORMAT; see FORMAT below for details

--from=UNIT
auto-scale input numbers to UNITs; default is 'none'; see UNIT below

--from-unit=N
specify the input unit size (instead of the default 1)

--grouping
use locale-defined grouping of digits, e.g. 1,000,000 (which means it has no effect
in the C/POSIX locale)

--header[=N]
print (without converting) the first N header lines; N defaults to 1 if not
specified

--invalid=MODE
failure mode for invalid numbers: MODE can be: abort (default), fail, warn, ignore

--padding=N
pad the output to N characters; positive N will right-align; negative N will
left-align; padding is ignored if the output is wider than N; the default is to
automatically pad if a whitespace is found

--round=METHOD
use METHOD for rounding when scaling; METHOD can be: up, down, from-zero (default),
towards-zero, nearest

--suffix=SUFFIX
add SUFFIX to output numbers, and accept optional SUFFIX in input numbers

--to=UNIT
auto-scale output numbers to UNITs; see UNIT below

--to-unit=N
the output unit size (instead of the default 1)

-z, --zero-terminated
line delimiter is NUL, not newline

--help display this help and exit

--version
output version information and exit

UNIT options:
none no auto-scaling is done; suffixes will trigger an error

auto accept optional single/two letter suffix:

1K = 1000, 1Ki = 1024, 1M = 1000000, 1Mi = 1048576,

si accept optional single letter suffix:

1K = 1000, 1M = 1000000, ...

iec accept optional single letter suffix:

1K = 1024, 1M = 1048576, ...

iec-i accept optional two-letter suffix:

1Ki = 1024, 1Mi = 1048576, ...

FIELDS supports cut(1) style field ranges:
N N'th field, counted from 1

N- from N'th field, to end of line

N-M from N'th to M'th field (inclusive)

-M from first to M'th field (inclusive)

- all fields

Multiple fields/ranges can be separated with commas

FORMAT must be suitable for printing one floating-point argument '%f'. Optional quote
(%'f) will enable --grouping (if supported by current locale). Optional width value
(%10f) will pad output. Optional zero (%010f) width will zero pad the number. Optional
negative values (%-10f) will left align. Optional precision (%.1f) will override the
input determined precision.

Exit status is 0 if all input numbers were successfully converted. By default, numfmt
will stop at the first conversion error with exit status 2. With --invalid='fail' a
warning is printed for each conversion error and the exit status is 2. With
--invalid='warn' each conversion error is diagnosed, but the exit status is 0. With
--invalid='ignore' conversion errors are not diagnosed and the exit status is 0.

EXAMPLES


$ numfmt --to=si 1000

-> "1.0K"

$ numfmt --to=iec 2048

-> "2.0K"

$ numfmt --to=iec-i 4096

-> "4.0Ki"

$ echo 1K | numfmt --from=si

-> "1000"

$ echo 1K | numfmt --from=iec

-> "1024"

$ df -B1 | numfmt --header --field 2-4 --to=si
$ ls -l | numfmt --header --field 5 --to=iec
$ ls -lh | numfmt --header --field 5 --from=iec --padding=10
$ ls -lh | numfmt --header --field 5 --from=iec --format %10f

Use numfmt online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    rEFInd
    rEFInd
    rEFInd is a fork of the rEFIt boot
    manager. Like rEFIt, rEFInd can
    auto-detect your installed EFI boot
    loaders and it presents a pretty GUI
    menu of boot option...
    Download rEFInd
  • 2
    ExpressLuke GSI
    ExpressLuke GSI
    This SourceForge download page was to
    grant users to download my source built
    GSIs, based upon phhusson's great
    work. I build both Android Pie and
    Android 1...
    Download ExpressLuke GSI
  • 3
    Music Caster
    Music Caster
    Music Caster is a tray music player
    that lets you cast your local music to a
    Google Cast device. On the first run,
    you will need to click the arrow in your
    tas...
    Download Music Caster
  • 4
    PyQt
    PyQt
    PyQt is the Python bindings for
    Digia's Qt cross-platform
    application development framework. It
    supports Python v2 and v3 and Qt v4 and
    Qt v5. PyQt is avail...
    Download PyQt
  • 5
    Sardi
    Sardi
    Sardi is a complete restyling and
    optimisation of svg code. 6 choices for
    your applications and 10 kind of folders
    to use in your file manager. The sardi
    icons...
    Download Sardi
  • 6
    LMMS Digital Audio Workstation
    LMMS Digital Audio Workstation
    LMMS is a free cross-platform software
    which allows you to produce music with
    your computer. If you like this project
    consider getting involved in the project
    h...
    Download LMMS Digital Audio Workstation
  • More »

Linux commands

  • 1
    a2query
    a2query
    a2query - retrieve runtime
    configuration from a local Apache 2 HTTP
    server ...
    Run a2query
  • 2
    a2x
    a2x
    a2x - A toolchain manager for AsciiDoc
    (converts Asciidoc text files to other
    file formats) ...
    Run a2x
  • 3
    crlutil
    crlutil
    crlutil - List, generate, modify, or
    delete CRLs within the NSS security
    database file(s) and list, create,
    modify or delete certificates entries in
    a particul...
    Run crlutil
  • 4
    crm
    crm
    Use crm online using onworks.net
    services. ...
    Run crm
  • 5
    FvwmProxy
    FvwmProxy
    FvwmProxy - the fvwm proxy module ...
    Run FvwmProxy
  • 6
    FvwmRearrange
    FvwmRearrange
    FvwmRearrange - rearrange fvwm windows ...
    Run FvwmRearrange
  • More »

Ad