st for Mac
simple statistics from the command line interface (CLI)
st — overview
st ==
simple statistics from the command line interface (CLI)
Description
Imagine you have this sample file:
$ cat numbers.txt 1 2 3 4 5 6 7 8 9 10
How do you calculate the sum of the numbers?
The traditional way
If you ask around, you'll come up with suggestions like these:
$ awk '{s+=$1} END {print s}' numbers.txt 55
$ perl -lne '$x += $_; END { print $x; }' numbers.txt 55
$ sum=0; while read num ; do sum=$(($sum + $num)); done --quartile=
If no functions are selected, "st" will print the default output:
N min max sum mean stddev
You can also use the following predefined sets of functions:
--summary # five-number summary (min q1 median q3 max) --complete # everything
Formatting
--format|fmt|f= # default: "%g" --delimiter|d= # default: "t"
--no-header|nh # don't display header --transpose-output|to # switch rows and columns
Examples of valid formats ("--format" option):
%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
Input validation
By default, "st" skips invalid input with a warning.
You can change this behavior with the following options:
--strict # throws an error, interrupting process --quiet|q # no warning
Author
Nelson Ferraz >
Contribute
Send comments, suggestions and bug reports to:
https://github.com/nferraz/st/issues
Or fork the code on github:
https://github.com/nferraz/st
Details
来自命令行的统计数据
How to install st
- Open Terminal (press ⌘ + Space and type “Terminal”).
- If Homebrew is not installed yet, run the command below first.
- Run this command:
Latest 10 releases
Last updated 2017-06-26; current version v1.1.4, with the latest 10 releases listed.
| Version | Released | Type | Size | macOS | Windows | Linux |
|---|---|---|---|---|---|---|
| v1.1.4 | 2017-06-26 | Stable | — | — | — | — |
| v1.1.3 | 2017-06-26 | Stable | — | — | — | — |
| v1.1.2 | 2015-04-01 | Stable | — | — | — | — |
| v1.1.1 | 2013-10-10 | Stable | — | — | — | — |
| v1.1.0 | 2013-09-23 | Stable | — | — | — | — |
| v1.0.10 | 2013-09-23 | Stable | — | — | — | — |
| v1.0.9 | 2013-09-23 | Stable | — | — | — | — |
| v1.0.8 | 2013-09-11 | Stable | — | — | — | — |
| v1.0.7 | 2013-09-11 | Stable | — | — | — | — |
| q1 | 2013-09-11 | Stable | — | — | — | — |
Data from GitHub Releases; stable releases first, each group sorted newest first.
Prebuilt bottle platforms
Official Homebrew bottles cover:
- all
⚠️ No prebuilt bottle for Intel Macs; Intel users need brew install --build-from-source to build from source.
Cannot be installed alongside: schemathesis。
To use both, first brew uninstall the conflicting package, or install it in an isolated environment.
Compared with similar apps
Only public metadata is compared, with no subjective recommendation; see the compare pages for field-by-field comparisons.
| App | Version | License | Architecture | 30-day installs |
|---|---|---|---|---|
| st | v1.1.4 | MIT | CLI | 6 |
| httpstat | 1.3.0 | MIT | CLI | 13 |
| collectd | 5.12.0 | MIT | CLI | 20 |
| libstatgrab | LIBSTATGRAB_0_92_1 | GPL-2.0-or-later AND LGPL-2.1-or-later | CLI | 1 |
Similar apps: Command-line Tools
httpstat
httpstat visualizes curl(1) statistics in a way of beauty and clarity.collectd
collectd is a statistics collection and monitoring daemon that runs quietly in the background…libstatgrab
Provides cross-platform access to statistics about the systemcloc
cloc Count Lines of Codeopenssl@4
Cryptography and SSL/TLS Toolkitxz
General-purpose data compression with high compression ratioCategories: Command-line Tools