EnglishFrenchSpanish

OnWorks favicon

total - Online in the Cloud

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

This is the command total 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


total - sum up columns

SYNOPSIS


total [ -m ][ -sE | -p | -u | -l ][ -i{f|d}[N] ][ -o{f|d} ][ -tC ][ -N [ -r ]] [ file ..
]

DESCRIPTION


Total sums up columns of real numbers from one or more files and prints out the result on
its standard output.

By default, total computes the straigt sum of each input column, but multiplication can be
specified instead with the -p option. Likewise, the -u option means find the upper limit
(maximum), and -l means find the lower limit (minimum).

Sums of powers can be computed by giving an exponent with the -s option. (Note that there
is no space between the -s and the exponent.) This exponent can be any real number,
positive or negative. The absolute value of the input is always taken before the power is
computed in order to avoid complex results. Thus, -s1 will produce a sum of absolute
values. The default power (zero) is interpreted as a straight sum without taking absolute
values.

The -m option can be used to compute the mean rather than the total. For sums, the
arithmetic mean is computed. For products, the geometric mean is computed. (A
logarithmic sum of absolute values is used to avoid overflow, and zero values are silently
ignored.)

If the input data is binary, the -id or -if option may be given for 64-bit double or
32-bit float values, respectively. Either option may be followed immediately by an
optional count, which defaults to 1, indicating the number of double or float binary
values to read per record on the input file. (There can be no space between the option
and this count.) Similarly, the -od and -of options specify binary double or float
output, respectively. These options do not need a count, as this will be determined by
the number of input channels.

A count can be given as the number of lines to read before computing a result. Normally,
total reads each file to its end before producing its result, but this behavior may be
overridden by inserting blank lines in the input. For each blank input line, total
produces a result as if the end-of-file had been reached. If two blank lines immediately
follow each other, total closes the file and proceeds to the next one (after reporting the
result). The -N option (where N is a decimal integer) tells total to produce a result and
reset the calculation after every N input lines. In addition, the -r option can be
specified to override reinitialization and thus give a running total every N lines (or
every blank line). If the end of file is reached, the current total is printed and the
calculation is reset before the next file (with or without the -r option).

The -tC option can be used to specify the input and output tab character. The default tab
character is TAB.

If no files are given, the standard input is read.

EXAMPLE


To compute the RMS value of colon-separated columns in a file:

total -t: -m -s2 input

To produce a running product of values from a file:

total -p -1 -r input

Use total online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    Osu!
    Osu!
    Osu! is a simple rhythm game with a well
    thought out learning curve for players
    of all skill levels. One of the great
    aspects of Osu! is that it is
    community-dr...
    Download Osu!
  • 2
    LIBPNG: PNG reference library
    LIBPNG: PNG reference library
    Reference library for supporting the
    Portable Network Graphics (PNG) format.
    Audience: Developers. Programming
    Language: C. This is an application that
    can also...
    Download LIBPNG: PNG reference library
  • 3
    Metal detector based on  RP2040
    Metal detector based on RP2040
    Based on Raspberry Pi Pico board, this
    metal detector is included in pulse
    induction metal detectors category, with
    well known advantages and disadvantages.
    RP...
    Download Metal detector based on RP2040
  • 4
    PAC Manager
    PAC Manager
    PAC is a Perl/GTK replacement for
    SecureCRT/Putty/etc (linux
    ssh/telnet/... gui)... It provides a GUI
    to configure connections: users,
    passwords, EXPECT regula...
    Download PAC Manager
  • 5
    GeoServer
    GeoServer
    GeoServer is an open-source software
    server written in Java that allows users
    to share and edit geospatial data.
    Designed for interoperability, it
    publishes da...
    Download GeoServer
  • 6
    Firefly III
    Firefly III
    A free and open-source personal finance
    manager. Firefly III features a
    double-entry bookkeeping system. You can
    quickly enter and organize your
    transactions i...
    Download Firefly III
  • More »

Linux commands

Ad