W3cubDocs

/Nushell

math sum for math

Returns the sum of a list of numbers or of each column in a table.

Signature

> math sum {flags}

Input/output types:

input output
list<duration> duration
list<filesize> filesize
list<number> number
range number
table table

Examples

Sum a list of numbers

> [123] |math sum
6

Get the disk usage for the current directory

>ls|getsize|math sum

Copyright © 2019–2023 The Nushell Project DevelopersLicensed under the MIT License.
https://www.nushell.sh/commands/docs/math_sum.html