.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "ST 1" .TH ST 1 "2019-12-03" "perl v5.30.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" st\-console \- simple statistics from the command line interface (CLI) .SH "DESCRIPTION" .IX Header "DESCRIPTION" \&\f(CW\*(C`st\-console\*(C'\fR is a command-line tool to calculate simple statistics from a file or standard input. .SH "USAGE" .IX Header "USAGE" .Vb 1 \& st\-console [options] [input_file] .Ve .SS "\s-1OPTIONS\s0" .IX Subsection "OPTIONS" \fI\s-1FUNCTIONS\s0\fR .IX Subsection "FUNCTIONS" .PP .Vb 8 \& \-\-N|n|count # sample size \& \-\-min # minimum \& \-\-max # maximum \& \-\-mean|average|avg|m # mean \& \-\-stdev|sd # standard deviation \& \-\-stderr|sem|se # standard error of mean \& \-\-sum|s # sum of elements of the sample \& \-\-variance|var # variance .Ve .PP The following options require that the whole dataset is stored in memory, which can be problematic for huge datasets: .PP .Vb 5 \& \-\-q1 # first quartile \& \-\-median|q2 # second quartile, or median \& \-\-q3 # third quartile \& \-\-percentile=f # percentile=<0..100> \& \-\-quartile=i # quartile=<1..4> .Ve .PP If no functions are selected, \f(CW\*(C`st\-console\*(C'\fR will print the default output: .PP .Vb 1 \& N min max sum mean stddev .Ve .PP You can also use the following predefined sets of functions: .PP .Vb 2 \& \-\-summary # five\-number summary (min q1 median q3 max) \& \-\-complete # everything .Ve .PP \fI\s-1FORMATTING\s0\fR .IX Subsection "FORMATTING" .PP .Vb 1 \& \-\-format|fmt|f= # default: "%g" .Ve .PP Examples of valid formats: .PP .Vb 4 \& %d signed integer, in decimal \& %e floating\-point number, in scientific notation \& %f floating\-point number, in fixed decimal notation \& %g floating\-point number, in %e or %f notation \& \& \-\-delimiter|d= # default: "\et" \& \& \-\-no\-header|nh # don\*(Aqt display header \& \-\-transpose\-output|to # switch rows and columns .Ve .PP \fI\s-1INPUT VALIDATION\s0\fR .IX Subsection "INPUT VALIDATION" .PP By default, \f(CW\*(C`st\-console\*(C'\fR skips invalid input with a warning. .PP You can change this behavior with the following options: .PP .Vb 2 \& \-\-strict # throws an error, interrupting process \& \-\-quiet|q # no warning .Ve .SH "AUTHOR" .IX Header "AUTHOR" Nelson Ferraz .SH "CONTRIBUTE" .IX Header "CONTRIBUTE" Send comments, suggestions and bug reports to: .PP https://github.com/nferraz/st/issues .PP Or fork the code on github: .PP https://github.com/nferraz/st .SS "\s-1THANKS\s0" .IX Subsection "THANKS" imurray, who suggested a different algorithm for calculating variance. .PP asgeirn, who suggested a input filter and helped to remove some warnings. .PP gabeguz, who modified the script to make it more portable. .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright (c) 2013 Nelson Ferraz. .PP This program is free software; you can redistribute it and/or modify it under the \s-1MIT\s0 License (see \s-1LICENSE\s0).