summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorJason McIntyre <jmc@cvs.openbsd.org>2015-03-19 11:38:13 +0000
committerJason McIntyre <jmc@cvs.openbsd.org>2015-03-19 11:38:13 +0000
commit0cfc6201bcb2a4f0dad46556bf38f600831bdb41 (patch)
tree82a090dce751855e556ba36451d86a5e703661c7 /usr.bin
parenta0b091c175f9c9ca5c9effef85fccd7654103280 (diff)
first run through this page. mainly getting SYNOPSIS and usage() orderly
(if perhaps not quite correct yet);
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/sort/sort.129
-rw-r--r--usr.bin/sort/sort.c6
2 files changed, 15 insertions, 20 deletions
diff --git a/usr.bin/sort/sort.1 b/usr.bin/sort/sort.1
index 89f621c7d32..9130d971e32 100644
--- a/usr.bin/sort/sort.1
+++ b/usr.bin/sort/sort.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: sort.1,v 1.41 2015/03/17 17:45:13 millert Exp $
+.\" $OpenBSD: sort.1,v 1.42 2015/03/19 11:38:12 jmc Exp $
.\"
.\" Copyright (c) 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -32,7 +32,7 @@
.\"
.\" @(#)sort.1 8.1 (Berkeley) 6/6/93
.\"
-.Dd July 3, 2012
+.Dd $Mdocdate: March 19 2015 $
.Dt SORT 1
.Os
.Sh NAME
@@ -40,15 +40,11 @@
.Nd sort, merge, or sequence check text and binary files
.Sh SYNOPSIS
.Nm sort
-.Op Fl bcCdfghiRMmnrsuVz
-.Sm off
-.Op Fl k\ \& Ar field1 Op , Ar field2
-.Sm on
+.Op Fl bCcdfgHhiMnRrsuVz
+.Op Fl k Ar field1 Ns Op , Ns Ar field2
.Op Fl o Ar output
-.Op Fl S Ar memsize
-.Bk -words
+.Op Fl S Ar size
.Op Fl T Ar dir
-.Ek
.Op Fl t Ar char
.Op Ar
.Sh DESCRIPTION
@@ -87,7 +83,7 @@ Write the output to the
.Ar output
file instead of the standard output.
This file can be the same as one of the input files.
-.It Fl S Ar size, Fl Fl buffer-size Ns = Ns Ar size
+.It Fl S Ar size , Fl Fl buffer-size Ns = Ns Ar size
Use a memory buffer no larger than
.Ar size .
The modifiers %, b, K, M, G, T, P, E, Z, and Y can be used.
@@ -96,6 +92,10 @@ If no memory limit is specified,
may use up to about 90% of available memory.
If the input is too big to fit into the memory buffer,
temporary files are used.
+.It Fl s
+Stable sort; maintains the original record order of records that have
+and equal key.
+This is a non-standard feature, but it is widely accepted and used.
.It Fl T Ar dir , Fl Fl temporary-directory Ns = Ns Ar dir
Store temporary files in the directory
.Ar dir .
@@ -115,10 +115,6 @@ or
.Fl c ,
.Nm
also checks that there are no lines with duplicate keys.
-.It Fl s
-Stable sort; maintains the original record order of records that have
-and equal key.
-This is a non-standard feature, but it is widely accepted and used.
.It Fl Fl version
Print the version and exit.
.It Fl Fl help
@@ -234,9 +230,8 @@ can be attached independently to each
.Ar field
argument of the key specifications.
.It Xo
-.Sm off
-.Fl k\ \& Ar field1 Op , Ar field2 , Fl Fl key Ns = Ns Ar field1 Op , Ar field2
-.Sm on
+.Fl k Ar field1 Ns Op , Ns Ar field2 ,
+.Fl Fl key Ns = Ns Ar field1 Ns Op , Ns Ar field2
.Xc
Define a restricted sort key that has the starting position
.Ar field1 ,
diff --git a/usr.bin/sort/sort.c b/usr.bin/sort/sort.c
index 89229d0f216..594e4a19116 100644
--- a/usr.bin/sort/sort.c
+++ b/usr.bin/sort/sort.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sort.c,v 1.44 2015/03/17 17:45:13 millert Exp $ */
+/* $OpenBSD: sort.c,v 1.45 2015/03/19 11:38:12 jmc Exp $ */
/*-
* Copyright (C) 2009 Gabor Kovesdan <gabor@FreeBSD.org>
@@ -156,8 +156,8 @@ usage(int exit_val)
{
fprintf(exit_val ? stderr : stdout,
- "usage: %s [-bcCdfghiRMmnrsuVz] [-k field1[,field2]] [-o output] "
- "[-S memsize]\n\t[-T dir] [-t char] [file ...]\n", getprogname());
+ "usage: %s [-bCcdfgHhiMnRrsuVz] [-k field1[,field2]] [-o output] "
+ "[-S size]\n\t[-T dir] [-t char] [file ...]\n", getprogname());
exit(exit_val);
}