aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/ministat
diff options
context:
space:
mode:
authorDavid E. O'Brien <obrien@FreeBSD.org>2013-02-08 16:10:16 +0000
committerDavid E. O'Brien <obrien@FreeBSD.org>2013-02-08 16:10:16 +0000
commitd9a447559bc04121f7c6682e64abe67efa154864 (patch)
treeb2f038222ff8a70f687652441df00d2b564c8abe /usr.bin/ministat
parent3cbf5f97aafc2b249c509ee1162c47c9b28e591e (diff)
parentfbda3d5daeeb730a49d025b614b35a32f0319718 (diff)
downloadsrc-d9a447559bc04121f7c6682e64abe67efa154864.tar.gz
src-d9a447559bc04121f7c6682e64abe67efa154864.zip
Notes
Diffstat (limited to 'usr.bin/ministat')
-rw-r--r--usr.bin/ministat/ministat.17
-rw-r--r--usr.bin/ministat/ministat.c11
2 files changed, 13 insertions, 5 deletions
diff --git a/usr.bin/ministat/ministat.1 b/usr.bin/ministat/ministat.1
index 88d5324a05bf..ea31c2329dc2 100644
--- a/usr.bin/ministat/ministat.1
+++ b/usr.bin/ministat/ministat.1
@@ -25,7 +25,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd June 28, 2010
+.Dd November 10, 2012
.Dt MINISTAT 1
.Os
.Sh NAME
@@ -33,7 +33,7 @@
.Nd statistics utility
.Sh SYNOPSIS
.Nm
-.Op Fl ns
+.Op Fl Ans
.Op Fl C Ar column
.Op Fl c Ar confidence_level
.Op Fl d Ar delimiter
@@ -47,6 +47,9 @@ in the specified files or, if no file is specified, standard input.
.Pp
The options are as follows:
.Bl -tag -width Fl
+.It Fl A
+Just report the statistics of the input and relative comparisons,
+suppress the ASCII-art plot.
.It Fl n
Just report the raw statistics of the input, suppress the ASCII-art plot
and the relative comparisons.
diff --git a/usr.bin/ministat/ministat.c b/usr.bin/ministat/ministat.c
index 3b51e408d27e..218715c82421 100644
--- a/usr.bin/ministat/ministat.c
+++ b/usr.bin/ministat/ministat.c
@@ -509,7 +509,7 @@ usage(char const *whine)
fprintf(stderr, "%s\n", whine);
fprintf(stderr,
- "Usage: ministat [-C column] [-c confidence] [-d delimiter(s)] [-ns] [-w width] [file [file ...]]\n");
+ "Usage: ministat [-C column] [-c confidence] [-d delimiter(s)] [-Ans] [-w width] [file [file ...]]\n");
fprintf(stderr, "\tconfidence = {");
for (i = 0; i < NCONF; i++) {
fprintf(stderr, "%s%g%%",
@@ -517,6 +517,7 @@ usage(char const *whine)
studentpct[i]);
}
fprintf(stderr, "}\n");
+ fprintf(stderr, "\t-A : print statistics only. suppress the graph.\n");
fprintf(stderr, "\t-C : column number to extract (starts and defaults to 1)\n");
fprintf(stderr, "\t-d : delimiter(s) string, default to \" \\t\"\n");
fprintf(stderr, "\t-n : print summary statistics only, no graph/test\n");
@@ -538,6 +539,7 @@ main(int argc, char **argv)
int flag_s = 0;
int flag_n = 0;
int termwidth = 74;
+ int suppress_plot = 0;
if (isatty(STDOUT_FILENO)) {
struct winsize wsz;
@@ -550,8 +552,11 @@ main(int argc, char **argv)
}
ci = -1;
- while ((c = getopt(argc, argv, "C:c:d:snw:")) != -1)
+ while ((c = getopt(argc, argv, "AC:c:d:snw:")) != -1)
switch (c) {
+ case 'A':
+ suppress_plot = 1;
+ break;
case 'C':
column = strtol(optarg, &p, 10);
if (p != NULL && *p != '\0')
@@ -610,7 +615,7 @@ main(int argc, char **argv)
for (i = 0; i < nds; i++)
printf("%c %s\n", symbol[i+1], ds[i]->name);
- if (!flag_n) {
+ if (!flag_n && !suppress_plot) {
SetupPlot(termwidth, flag_s, nds);
for (i = 0; i < nds; i++)
DimPlot(ds[i]);