Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/sort Pull in various cosmetic changes from OpenBSD v...



details:   https://anonhg.NetBSD.org/src/rev/89620c585639
branches:  trunk
changeset: 503999:89620c585639
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Mon Feb 19 21:06:57 2001 +0000

description:
Pull in various cosmetic changes from OpenBSD version of this manpage - mostly
whitespace changes, which don't influence the layout of result manpage at all,
but also add -H to SYNOPSIS and state sort(1) appeared in v5, not v6 of
AT&T Unix.

diffstat:

 usr.bin/sort/sort.1 |  106 ++++++++++++++++++++++++---------------------------
 1 files changed, 50 insertions(+), 56 deletions(-)

diffs (271 lines):

diff -r 7c66cc73ecae -r 89620c585639 usr.bin/sort/sort.1
--- a/usr.bin/sort/sort.1       Mon Feb 19 20:50:17 2001 +0000
+++ b/usr.bin/sort/sort.1       Mon Feb 19 21:06:57 2001 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: sort.1,v 1.14 2001/02/19 16:27:04 jdolecek Exp $
+.\"    $NetBSD: sort.1,v 1.15 2001/02/19 21:06:57 jdolecek Exp $
 .\"
 .\" Copyright (c) 1991, 1993
 .\"    The Regents of the University of California.  All rights reserved.
@@ -44,7 +44,7 @@
 .Nd sort or merge text files
 .Sh SYNOPSIS
 .Nm sort
-.Op Fl cmubdfinrsS
+.Op Fl cmubdfHinrsS
 .Op Fl t Ar char
 .Op Fl R Ar char
 .Oo
@@ -57,11 +57,10 @@
 .Sh DESCRIPTION
 The
 .Nm
-utility
-sorts text files by lines.
+utility sorts text files by lines.
 Comparisons are based on one or more sort keys extracted
-from each line of input, and are performed
-lexicographically. By default, if keys are not given,
+from each line of input, and are performed lexicographically.
+By default, if keys are not given,
 .Nm
 regards each input line as a single field.
 .Pp
@@ -71,8 +70,7 @@
 Check that the single input file is sorted.
 If the file is not sorted,
 .Nm
-produces the appropriate error messages and exits with code 1;
-otherwise,
+produces the appropriate error messages and exits with code 1; otherwise,
 .Nm
 returns 0.
 .Nm
@@ -83,27 +81,23 @@
 .It Fl o Ar output
 The argument given is the name of an
 .Ar output
-file to
-be used instead of the standard output.
-This file
-can be the same as one of the input files.
+file to be used instead of the standard output.
+This file can be the same as one of the input files.
 .It Fl T Ar dir
 Use
 .Ar dir
-as the directory for temporary files.  The default is the
-value specified in the environment variable
+as the directory for temporary files.
+The default is the value specified in the environment variable
 .Ev TMPDIR or
 .Pa /tmp
 if
 .Ev TMPDIR
 is not defined.
 .It Fl u
-Unique: suppress all but one in each set of lines
-having equal keys.
+Unique: suppress all but one in each set of lines having equal keys.
 If used with the
 .Fl c
-option,
-check that there are no lines with duplicate keys.
+option, check that there are no lines with duplicate keys.
 .El
 .Pp
 The following options override the default ordering rules.
@@ -123,14 +117,12 @@
 in making comparisons.
 .It Fl f
 Considers all lowercase characters that have uppercase
-equivalents to be the same for purposes of
-comparison.
+equivalents to be the same for purposes of comparison.
 .It Fl i
 Ignore all non-printable characters.
 .It Fl n
-An initial numeric string, consisting of optional
-blank space, optional minus sign, and zero or more
-digits (including decimal point)
+An initial numeric string, consisting of optional blank space, optional
+minus sign, and zero or more digits (including decimal point)
 .\" with
 .\" optional radix character and thousands
 .\" separator
@@ -138,8 +130,7 @@
 is sorted by arithmetic value.
 (The
 .Fl n
-option no longer implies
-the
+option no longer implies the
 .Fl b
 option.)
 .It Fl r
@@ -152,12 +143,11 @@
 .Nm
 implementations only.
 .It Fl H
-Use a merge sort instead of a radix sort.  This option should be
-used for files larger than 60Mb.
+Use a merge sort instead of a radix sort.
+This option should be used for files larger than 60Mb.
 .El
 .Pp
-The treatment of field separators can be altered using the
-options:
+The treatment of field separators can be altered using these options:
 .Bl -tag -width Fl
 .It Fl b
 Ignores leading blank space when determining the start
@@ -171,19 +161,18 @@
 options.
 Otherwise, the
 .Fl b
-option can be
-attached independently to each
+option can be attached independently to each
 .Ar field
 argument of the
 .Fl k
 option (see below).
 Note that the
 .Fl b
-option
-has no effect unless key fields are specified.
+option has no effect unless key fields are specified.
 .It Fl t Ar char
 .Ar char
-is used as the field separator character. The initial
+is used as the field separator character.
+The initial
 .Ar char
 is not considered to be part of a field when determining
 key offsets (see below).
@@ -194,23 +183,26 @@
 delimits an empty field).
 If
 .Fl t
-is not specified,
-blank space characters are used as default field
-separators.
+is not specified, the default field separator is a sequence of
+blank-space characters, and consecutive blank spaces do
+.Em not
+delimit an empty field; further, the initial blank space
+.Em is
+considered part of a field when determining key offsets.
 .It Fl R Ar char
 .Ar char
 is used as the record separator character.
 This should be used with discretion;
 .Fl R Ar <alphanumeric>
 usually produces undesirable results.
-The default line separator is newline.
+The default record separator is newline.
 .It Xo
 .Fl k
 .Ar field1 Ns Op Li \&, Ns Ar field2
 .Xc
 Designates the starting position,
 .Ar field1 ,
-and optional ending position, 
+and optional ending position,
 .Ar field2 ,
 of a key field.
 The
@@ -225,15 +217,17 @@
 .Bl -tag -width Ar
 .It Ar file
 The pathname of a file to be sorted, merged, or checked.
-If no file
+If no
+.Ar file
 operands are specified, or if
-a file operand is
+a
+.Ar file
+operand is
 .Fl ,
 the standard input is used.
 .El
 .Pp
-A field is
-defined as a minimal sequence of characters followed by a
+A field is defined as a minimal sequence of characters followed by a
 field separator or a newline character.
 By default, the first
 blank space of a sequence of blank spaces acts as the field separator.
@@ -256,9 +250,12 @@
 .Ar field2
 have the form
 .Ar m Ns Li \&. Ns Ar n
-followed by one or more of the options
+and can be followed by one or more of the letters
 .Cm b , d , f , i ,
-.Cm n , r .
+.Cm n ,
+and
+.Cm r ,
+which correspond to the options discussed above.
 A
 .Ar field1
 position specified by
@@ -277,18 +274,15 @@
 .Ql \&.1 ,
 indicating the first character of the
 .Ar m Ns th
-field;
-If the
+field; if the
 .Fl b
 option is in effect,
 .Ar n
-is counted from the first
-non-blank character in the
+is counted from the first non-blank character in the
 .Ar m Ns th
 field;
 .Ar m Ns Li \&.1b
-refers to the first
-non-blank character in the
+refers to the first non-blank character in the
 .Ar m Ns th
 field.
 .Pp
@@ -347,13 +341,13 @@
 Sort exits with one of the following values:
 .Bl -tag -width flag -compact
 .It 0
-normal behavior.
+Normal behavior.
 .It 1
-on disorder (or non-uniqueness) with the
+On disorder (or non-uniqueness) with the
 .Fl c
 option
 .It 2
-an error occurred.
+An error occurred.
 .El
 .Sh ENVIRONMENT
 If the following environment variable exists, it is utilized by
@@ -389,7 +383,7 @@
 A
 .Nm
 command appeared in
-.At v6 .
+.At v5 .
 This
 .Nm
 implementation appeared in
@@ -414,7 +408,7 @@
 .Xr link 2
 and
 .Xr unlink 2 ,
-and thus fails in protected directories.
+and thus fails on protected directories.
 .Pp
 Input files should be text files. If file doesn't end with record separator
 (which is typically newline), the



Home | Main Index | Thread Index | Old Index