Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/jot Sort options, standardize usage message.
details: https://anonhg.NetBSD.org/src/rev/b3f2923a70b2
branches: trunk
changeset: 571411:b3f2923a70b2
user: peter <peter%NetBSD.org@localhost>
date: Mon Nov 22 17:34:24 2004 +0000
description:
Sort options, standardize usage message.
ok wiz@
diffstat:
usr.bin/jot/jot.1 | 42 +++++++++++++++++++++---------------------
usr.bin/jot/jot.c | 17 ++++-------------
2 files changed, 25 insertions(+), 34 deletions(-)
diffs (123 lines):
diff -r ff5386881c7e -r b3f2923a70b2 usr.bin/jot/jot.1
--- a/usr.bin/jot/jot.1 Mon Nov 22 17:32:08 2004 +0000
+++ b/usr.bin/jot/jot.1 Mon Nov 22 17:34:24 2004 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: jot.1,v 1.7 2003/08/07 11:14:11 agc Exp $
+.\" $NetBSD: jot.1,v 1.8 2004/11/22 17:34:24 peter Exp $
.\"
.\" Copyright (c) 1993
.\" The Regents of the University of California. All rights reserved.
@@ -37,18 +37,18 @@
.Nd print sequential or random data
.Sh SYNOPSIS
.Nm
-.Op Fl rcn
+.Op Fl cnr
.Bk -words
.Op Fl b Ar word
.Ek
.Bk -words
-.Op Fl w Ar word
+.Op Fl p Ar precision
.Ek
.Bk -words
.Op Fl s Ar string
.Ek
.Bk -words
-.Op Fl p Ar precision
+.Op Fl w Ar word
.Ek
.Oo Ar reps
.Oo Ar begin
@@ -65,29 +65,12 @@
.Pp
The following options are available:
.Bl -tag -width indent
-.It Fl r
-Generate random data instead of sequential data, the default.
.It Fl b Ar word
Just print
.Ar word
repetitively.
-.It Fl w Ar word
-Print
-.Ar word
-with the generated data appended to it.
-Octal, hexadecimal, exponential, ASCII, zero padded,
-and right-adjusted representations
-are possible by using the appropriate
-.Xr printf 3
-conversion specification inside
-.Ar word ,
-in which case the data are inserted rather than appended.
.It Fl c
This is an abbreviation for \fB\-w %c\fP.
-.It Fl s Ar string
-Print data separated by
-.Ar string .
-Normally, newlines separate data.
.It Fl n
Do not print the final newline normally appended to the output.
.It Fl p Ar precision
@@ -106,6 +89,23 @@
.Xr printf 3
conversion following
.Fl w .
+.It Fl r
+Generate random data instead of sequential data, the default.
+.It Fl s Ar string
+Print data separated by
+.Ar string .
+Normally, newlines separate data.
+.It Fl w Ar word
+Print
+.Ar word
+with the generated data appended to it.
+Octal, hexadecimal, exponential, ASCII, zero padded,
+and right-adjusted representations
+are possible by using the appropriate
+.Xr printf 3
+conversion specification inside
+.Ar word ,
+in which case the data are inserted rather than appended.
.El
.Pp
The last four arguments indicate, respectively,
diff -r ff5386881c7e -r b3f2923a70b2 usr.bin/jot/jot.c
--- a/usr.bin/jot/jot.c Mon Nov 22 17:32:08 2004 +0000
+++ b/usr.bin/jot/jot.c Mon Nov 22 17:34:24 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: jot.c,v 1.11 2004/01/05 23:23:34 jmmv Exp $ */
+/* $NetBSD: jot.c,v 1.12 2004/11/22 17:34:24 peter Exp $ */
/*-
* Copyright (c) 1993
@@ -39,7 +39,7 @@
#if 0
static char sccsid[] = "@(#)jot.c 8.1 (Berkeley) 6/6/93";
#endif
-__RCSID("$NetBSD: jot.c,v 1.11 2004/01/05 23:23:34 jmmv Exp $");
+__RCSID("$NetBSD: jot.c,v 1.12 2004/11/22 17:34:24 peter Exp $");
#endif /* not lint */
/*
@@ -326,17 +326,8 @@
static void
usage(void)
{
- fprintf(stderr, "jot - print sequential or random data\n\n");
- fprintf(stderr,
- "usage:\n\tjot [ options ] [ reps [ begin [ end [ s ] ] ] ]\n\n");
- fprintf(stderr, "Options:\n\t%s\t%s\t%s\t%s\t%s\t%s\t%s",
- "-r random data\n",
- "-c character data\n",
- "-n no final newline\n",
- "-b word repeated word\n",
- "-w word context word\n",
- "-s string data separator\n",
- "-p precision number of characters\n");
+ (void)fprintf(stderr, "usage: %s [-cnr] [-b word] [-p precision] "
+ "[-s string] [-w word] [reps [begin [end [s]]]]\n", getprogname());
exit(1);
}
Home |
Main Index |
Thread Index |
Old Index