560 lines
21 KiB
HTML
560 lines
21 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<html>
|
|
<head>
|
|
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
<link type="text/css" rel="stylesheet" href="style.css"><!-- Generated by The Open Group's rhtm tool v1.2.1 -->
|
|
<!-- Copyright (c) 2001 The Open Group, All Rights Reserved -->
|
|
<title>sort</title>
|
|
</head>
|
|
<body bgcolor="white">
|
|
<script type="text/javascript" language="JavaScript" src="../jscript/codes.js">
|
|
</script>
|
|
|
|
<basefont size="3"> <a name="sort"></a> <a name="tag_04_131"></a><!-- sort -->
|
|
<!--header start-->
|
|
<center><font size="2">The Open Group Base Specifications Issue 6<br>
|
|
IEEE Std 1003.1-2001<br>
|
|
Copyright © 2001 The IEEE and The Open Group, All Rights reserved.</font></center>
|
|
|
|
<!--header end-->
|
|
<hr size="2" noshade>
|
|
<h4><a name="tag_04_131_01"></a>NAME</h4>
|
|
|
|
<blockquote>sort - sort, merge, or sequence check text files</blockquote>
|
|
|
|
<h4><a name="tag_04_131_02"></a>SYNOPSIS</h4>
|
|
|
|
<blockquote class="synopsis">
|
|
<p><code><tt>sort</tt> <b>[</b><tt>-m</tt><b>][</b><tt>-o</tt> <i>output</i><b>][</b><tt>-bdfinru</tt><b>][</b><tt>-t</tt>
|
|
<i>char</i><b>][</b><tt>-k</tt> <i>keydef</i><b>]</b><tt>...</tt> <b>[</b><i>file</i><tt>...</tt><b>]</b><tt><br>
|
|
<br>
|
|
sort -c</tt> <b>[</b><tt>-bdfinru</tt><b>][</b><tt>-t</tt> <i>char</i><b>][</b><tt>-k</tt>
|
|
<i>keydef</i><b>][</b><i>file</i><b>]</b><tt><br>
|
|
</tt></code></p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_131_03"></a>DESCRIPTION</h4>
|
|
|
|
<blockquote>
|
|
<p>The <i>sort</i> utility shall perform one of the following functions:</p>
|
|
|
|
<ol>
|
|
<li>
|
|
<p>Sort lines of all the named files together and write the result to the specified output.</p>
|
|
</li>
|
|
|
|
<li>
|
|
<p>Merge lines of all the named (presorted) files together and write the result to the specified output.</p>
|
|
</li>
|
|
|
|
<li>
|
|
<p>Check that a single input file is correctly presorted.</p>
|
|
</li>
|
|
</ol>
|
|
|
|
<p>Comparisons shall be based on one or more sort keys extracted from each line of input (or, if no sort keys are specified, the
|
|
entire line up to, but not including, the terminating <newline>), and shall be performed using the collating sequence of the
|
|
current locale.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_131_04"></a>OPTIONS</h4>
|
|
|
|
<blockquote>
|
|
<p>The <i>sort</i> utility shall conform to the Base Definitions volume of IEEE Std 1003.1-2001, <a href=
|
|
"../basedefs/xbd_chap12.html#tag_12_02">Section 12.2, Utility Syntax Guidelines</a>, and the <b>-k</b> <i>keydef</i> option should
|
|
follow the <b>-b</b>, <b>-d</b>, <b>-f</b>, <b>-i</b>, <b>-n</b>, and <b>-r</b> options.</p>
|
|
|
|
<p>The following options shall be supported:</p>
|
|
|
|
<dl compact>
|
|
<dt><b>-c</b></dt>
|
|
|
|
<dd>Check that the single input file is ordered as specified by the arguments and the collating sequence of the current locale. No
|
|
output shall be produced; only the exit code shall be affected.</dd>
|
|
|
|
<dt><b>-m</b></dt>
|
|
|
|
<dd>Merge only; the input file shall be assumed to be already sorted.</dd>
|
|
|
|
<dt><b>-o </b> <i>output</i></dt>
|
|
|
|
<dd>Specify the name of an output file to be used instead of the standard output. This file can be the same as one of the input
|
|
<i>file</i>s.</dd>
|
|
|
|
<dt><b>-u</b></dt>
|
|
|
|
<dd>Unique: suppress all but one in each set of lines having equal keys. If used with the <b>-c</b> option, check that there are no
|
|
lines with duplicate keys, in addition to checking that the input file is sorted.</dd>
|
|
</dl>
|
|
|
|
<p>The following options shall override the default ordering rules. When ordering options appear independent of any key field
|
|
specifications, the requested field ordering rules shall be applied globally to all sort keys. When attached to a specific key (see
|
|
<b>-k</b>), the specified ordering options shall override all global ordering options for that key.</p>
|
|
|
|
<dl compact>
|
|
<dt><b>-d</b></dt>
|
|
|
|
<dd>Specify that only <blank>s and alphanumeric characters, according to the current setting of <i>LC_CTYPE ,</i> shall be
|
|
significant in comparisons. The behavior is undefined for a sort key to which <b>-i</b> or <b>-n</b> also applies.</dd>
|
|
|
|
<dt><b>-f</b></dt>
|
|
|
|
<dd>Consider all lowercase characters that have uppercase equivalents, according to the current setting of <i>LC_CTYPE ,</i> to be
|
|
the uppercase equivalent for the purposes of comparison.</dd>
|
|
|
|
<dt><b>-i</b></dt>
|
|
|
|
<dd>Ignore all characters that are non-printable, according to the current setting of <i>LC_CTYPE .</i></dd>
|
|
|
|
<dt><b>-n</b></dt>
|
|
|
|
<dd>Restrict the sort key to an initial numeric string, consisting of optional <blank>s, optional minus sign, and zero or
|
|
more digits with an optional radix character and thousands separators (as defined in the current locale), which shall be sorted by
|
|
arithmetic value. An empty digit string shall be treated as zero. Leading zeros and signs on zeros shall not affect ordering.</dd>
|
|
|
|
<dt><b>-r</b></dt>
|
|
|
|
<dd>Reverse the sense of comparisons.</dd>
|
|
</dl>
|
|
|
|
<p>The treatment of field separators can be altered using the options:</p>
|
|
|
|
<dl compact>
|
|
<dt><b>-b</b></dt>
|
|
|
|
<dd>Ignore leading <blank>s when determining the starting and ending positions of a restricted sort key. If the <b>-b</b>
|
|
option is specified before the first <b>-k</b> option, it shall be applied to all <b>-k</b> options. Otherwise, the <b>-b</b>
|
|
option can be attached independently to each <b>-k</b> <i>field_start</i> or <i>field_end</i> option-argument (see below).</dd>
|
|
|
|
<dt><b>-t </b> <i>char</i></dt>
|
|
|
|
<dd>Use <i>char</i> as the field separator character; <i>char</i> shall not be considered to be part of a field (although it can be
|
|
included in a sort key). Each occurrence of <i>char</i> shall be significant (for example, <<i>char</i>><<i>char</i>>
|
|
delimits an empty field). If <b>-t</b> is not specified, <blank>s shall be used as default field separators; each maximal
|
|
non-empty sequence of <blank>s that follows a non- <blank> shall be a field separator.</dd>
|
|
</dl>
|
|
|
|
<p>Sort keys can be specified using the options:</p>
|
|
|
|
<dl compact>
|
|
<dt><b>-k </b> <i>keydef</i></dt>
|
|
|
|
<dd>The <i>keydef</i> argument is a restricted sort key field definition. The format of this definition is:
|
|
|
|
<pre>
|
|
<i>field_start</i><b>[</b><i>type</i><b>][</b><tt>,</tt><i>field_end</i><b>[</b><i>type</i><b>]]</b>
|
|
</pre>
|
|
|
|
<p>where <i>field_start</i> and <i>field_end</i> define a key field restricted to a portion of the line (see the EXTENDED
|
|
DESCRIPTION section), and <i>type</i> is a modifier from the list of characters <tt>'b'</tt> , <tt>'d'</tt> , <tt>'f'</tt> ,
|
|
<tt>'i'</tt> , <tt>'n'</tt> , <tt>'r'</tt> . The <tt>'b'</tt> modifier shall behave like the <b>-b</b> option, but shall apply only
|
|
to the <i>field_start</i> or <i>field_end</i> to which it is attached. The other modifiers shall behave like the corresponding
|
|
options, but shall apply only to the key field to which they are attached; they shall have this effect if specified with
|
|
<i>field_start</i>, <i>field_end</i>, or both. If any modifier is attached to a <i>field_start</i> or to a <i>field_end</i>, no
|
|
option shall apply to either. Implementations shall support at least nine occurrences of the <b>-k</b> option, which shall be
|
|
significant in command line order. If no <b>-k</b> option is specified, a default sort key of the entire line shall be used.</p>
|
|
|
|
<p>When there are multiple key fields, later keys shall be compared only after all earlier keys compare equal. Except when the
|
|
<b>-u</b> option is specified, lines that otherwise compare equal shall be ordered as if none of the options <b>-d</b>, <b>-f</b>,
|
|
<b>-i</b>, <b>-n</b>, or <b>-k</b> were present (but with <b>-r</b> still in effect, if it was specified) and with all bytes in the
|
|
lines significant to the comparison. The order in which lines that still compare equal are written is unspecified.</p>
|
|
</dd>
|
|
</dl>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_131_05"></a>OPERANDS</h4>
|
|
|
|
<blockquote>
|
|
<p>The following operand shall be supported:</p>
|
|
|
|
<dl compact>
|
|
<dt><i>file</i></dt>
|
|
|
|
<dd>A pathname of a file to be sorted, merged, or checked. If no <i>file</i> operands are specified, or if a <i>file</i> operand is
|
|
<tt>'-'</tt> , the standard input shall be used.</dd>
|
|
</dl>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_131_06"></a>STDIN</h4>
|
|
|
|
<blockquote>
|
|
<p>The standard input shall be used only if no <i>file</i> operands are specified, or if a <i>file</i> operand is <tt>'-'</tt> .
|
|
See the INPUT FILES section.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_131_07"></a>INPUT FILES</h4>
|
|
|
|
<blockquote>
|
|
<p>The input files shall be text files, except that the <i>sort</i> utility shall add a <newline> to the end of a file ending
|
|
with an incomplete last line.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_131_08"></a>ENVIRONMENT VARIABLES</h4>
|
|
|
|
<blockquote>
|
|
<p>The following environment variables shall affect the execution of <i>sort</i>:</p>
|
|
|
|
<dl compact>
|
|
<dt><i>LANG</i></dt>
|
|
|
|
<dd>Provide a default value for the internationalization variables that are unset or null. (See the Base Definitions volume of
|
|
IEEE Std 1003.1-2001, <a href="../basedefs/xbd_chap08.html#tag_08_02">Section 8.2, Internationalization Variables</a> for
|
|
the precedence of internationalization variables used to determine the values of locale categories.)</dd>
|
|
|
|
<dt><i>LC_ALL</i></dt>
|
|
|
|
<dd>If set to a non-empty string value, override the values of all the other internationalization variables.</dd>
|
|
|
|
<dt><i>LC_COLLATE</i></dt>
|
|
|
|
<dd><br>
|
|
Determine the locale for ordering rules.</dd>
|
|
|
|
<dt><i>LC_CTYPE</i></dt>
|
|
|
|
<dd>Determine the locale for the interpretation of sequences of bytes of text data as characters (for example, single-byte as
|
|
opposed to multi-byte characters in arguments and input files) and the behavior of character classification for the <b>-b</b>,
|
|
<b>-d</b>, <b>-f</b>, <b>-i</b>, and <b>-n</b> options.</dd>
|
|
|
|
<dt><i>LC_MESSAGES</i></dt>
|
|
|
|
<dd>Determine the locale that should be used to affect the format and contents of diagnostic messages written to standard
|
|
error.</dd>
|
|
|
|
<dt><i>LC_NUMERIC</i></dt>
|
|
|
|
<dd><br>
|
|
Determine the locale for the definition of the radix character and thousands separator for the <b>-n</b> option.</dd>
|
|
|
|
<dt><i>NLSPATH</i></dt>
|
|
|
|
<dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
Determine the location of message catalogs for the processing of <i>LC_MESSAGES .</i> <img src="../images/opt-end.gif" alt=
|
|
"[Option End]" border="0"></dd>
|
|
</dl>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_131_09"></a>ASYNCHRONOUS EVENTS</h4>
|
|
|
|
<blockquote>
|
|
<p>Default.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_131_10"></a>STDOUT</h4>
|
|
|
|
<blockquote>
|
|
<p>Unless the <b>-o</b> or <b>-c</b> options are in effect, the standard output shall contain the sorted input.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_131_11"></a>STDERR</h4>
|
|
|
|
<blockquote>
|
|
<p>The standard error shall be used for diagnostic messages. A warning message about correcting an incomplete last line of an input
|
|
file may be generated, but need not affect the final exit status.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_131_12"></a>OUTPUT FILES</h4>
|
|
|
|
<blockquote>
|
|
<p>If the <b>-o</b> option is in effect, the sorted input shall be written to the file <i>output</i>.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_131_13"></a>EXTENDED DESCRIPTION</h4>
|
|
|
|
<blockquote>
|
|
<p>The notation:</p>
|
|
|
|
<pre>
|
|
<tt>-k</tt> <i>field_start</i><b>[</b><i>type</i><b>][</b><tt>,</tt><i>field_end</i><b>[</b><i>type</i><b>]]</b>
|
|
</pre>
|
|
|
|
<p>shall define a key field that begins at <i>field_start</i> and ends at <i>field_end</i> inclusive, unless <i>field_start</i>
|
|
falls beyond the end of the line or after <i>field_end</i>, in which case the key field is empty. A missing <i>field_end</i> shall
|
|
mean the last character of the line.</p>
|
|
|
|
<p>A field comprises a maximal sequence of non-separating characters and, in the absence of option <b>-t</b>, any preceding field
|
|
separator.</p>
|
|
|
|
<p>The <i>field_start</i> portion of the <i>keydef</i> option-argument shall have the form:</p>
|
|
|
|
<pre>
|
|
<i>field_number</i><b>[</b><tt>.</tt><i>first_character</i><b>]</b>
|
|
</pre>
|
|
|
|
<p>Fields and characters within fields shall be numbered starting with 1. The <i>field_number</i> and <i>first_character</i>
|
|
pieces, interpreted as positive decimal integers, shall specify the first character to be used as part of a sort key. If
|
|
<i>.first_character</i> is omitted, it shall refer to the first character of the field.</p>
|
|
|
|
<p>The <i>field_end</i> portion of the <i>keydef</i> option-argument shall have the form:</p>
|
|
|
|
<pre>
|
|
<i>field_number</i><b>[</b><tt>.</tt><i>last_character</i><b>]</b>
|
|
</pre>
|
|
|
|
<p>The <i>field_number</i> shall be as described above for <i>field_start.</i> The <i>last_character</i> piece, interpreted as a
|
|
non-negative decimal integer, shall specify the last character to be used as part of the sort key. If <i>last_character</i>
|
|
evaluates to zero or <i>.last_character</i> is omitted, it shall refer to the last character of the field specified by
|
|
<i>field_number</i>.</p>
|
|
|
|
<p>If the <b>-b</b> option or <b>b</b> type modifier is in effect, characters within a field shall be counted from the first non-
|
|
<blank> in the field. (This shall apply separately to <i>first_character</i> and <i>last_character</i>.)</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_131_14"></a>EXIT STATUS</h4>
|
|
|
|
<blockquote>
|
|
<p>The following exit values shall be returned:</p>
|
|
|
|
<dl compact>
|
|
<dt> 0</dt>
|
|
|
|
<dd>All input files were output successfully, or <b>-c</b> was specified and the input file was correctly sorted.</dd>
|
|
|
|
<dt> 1</dt>
|
|
|
|
<dd>Under the <b>-c</b> option, the file was not ordered as specified, or if the <b>-c</b> and <b>-u</b> options were both
|
|
specified, two input lines were found with equal keys.</dd>
|
|
|
|
<dt>>1</dt>
|
|
|
|
<dd>An error occurred.</dd>
|
|
</dl>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_131_15"></a>CONSEQUENCES OF ERRORS</h4>
|
|
|
|
<blockquote>
|
|
<p>Default.</p>
|
|
</blockquote>
|
|
|
|
<hr>
|
|
<div class="box"><em>The following sections are informative.</em></div>
|
|
|
|
<h4><a name="tag_04_131_16"></a>APPLICATION USAGE</h4>
|
|
|
|
<blockquote>
|
|
<p>The default value for <b>-t</b>, <blank>, has different properties from, for example, <b>-t</b> "<space>". If a line
|
|
contains:</p>
|
|
|
|
<pre>
|
|
<tt><space><space>foo
|
|
</tt>
|
|
</pre>
|
|
|
|
<p>the following treatment would occur with default separation as opposed to specifically selecting a <space>:</p>
|
|
|
|
<center>
|
|
<table border="1" cellpadding="3" align="center">
|
|
<tr valign="top">
|
|
<th align="center">
|
|
<p class="tent"><b>Field</b></p>
|
|
</th>
|
|
<th align="center">
|
|
<p class="tent"><b>Default</b></p>
|
|
</th>
|
|
<th align="center">
|
|
<p class="tent"><b>-t "<space>"</b></p>
|
|
</th>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">1</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"><space><space>foo</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"><i>empty</i></p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">2</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"><i>empty</i></p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"><i>empty</i></p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">3</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"><i>empty</i></p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">foo</p>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</center>
|
|
|
|
<p>The leading field separator itself is included in a field when <b>-t</b> is not used. For example, this command returns an exit
|
|
status of zero, meaning the input was already sorted:</p>
|
|
|
|
<pre>
|
|
<tt>sort -c -k 2 <<eof
|
|
y<tab>b
|
|
x<space>a
|
|
eof
|
|
</tt>
|
|
</pre>
|
|
|
|
<p>(assuming that a <tab> precedes the <space> in the current collating sequence). The field separator is not included
|
|
in a field when it is explicitly set via <b>-t</b>. This is historical practice and allows usage such as:</p>
|
|
|
|
<pre>
|
|
<tt>sort -t "|" -k 2n <<eof
|
|
Atlanta|425022|Georgia
|
|
Birmingham|284413|Alabama
|
|
Columbia|100385|South Carolina
|
|
eof
|
|
</tt>
|
|
</pre>
|
|
|
|
<p>where the second field can be correctly sorted numerically without regard to the non-numeric field separator.</p>
|
|
|
|
<p>The wording in the OPTIONS section clarifies that the <b>-b</b>, <b>-d</b>, <b>-f</b>, <b>-i</b>, <b>-n</b>, and <b>-r</b>
|
|
options have to come before the first sort key specified if they are intended to apply to all specified keys. The way it is
|
|
described in this volume of IEEE Std 1003.1-2001 matches historical practice, not historical documentation. The results
|
|
are unspecified if these options are specified after a <b>-k</b> option.</p>
|
|
|
|
<p>The <b>-f</b> option might not work as expected in locales where there is not a one-to-one mapping between an uppercase and a
|
|
lowercase letter.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_131_17"></a>EXAMPLES</h4>
|
|
|
|
<blockquote>
|
|
<ol>
|
|
<li>
|
|
<p>The following command sorts the contents of <b>infile</b> with the second field as the sort key:</p>
|
|
|
|
<pre>
|
|
<tt>sort -k 2,2 infile
|
|
</tt>
|
|
</pre>
|
|
</li>
|
|
|
|
<li>
|
|
<p>The following command sorts, in reverse order, the contents of <b>infile1</b> and <b>infile2</b>, placing the output in
|
|
<b>outfile</b> and using the second character of the second field as the sort key (assuming that the first character of the second
|
|
field is the field separator):</p>
|
|
|
|
<pre>
|
|
<tt>sort -r -o outfile -k 2.2,2.2 infile1 infile2
|
|
</tt>
|
|
</pre>
|
|
</li>
|
|
|
|
<li>
|
|
<p>The following command sorts the contents of <b>infile1</b> and <b>infile2</b> using the second non- <blank> of the second
|
|
field as the sort key:</p>
|
|
|
|
<pre>
|
|
<tt>sort -k 2.2b,2.2b infile1 infile2
|
|
</tt>
|
|
</pre>
|
|
</li>
|
|
|
|
<li>
|
|
<p>The following command prints the System V password file (user database) sorted by the numeric user ID (the third
|
|
colon-separated field):</p>
|
|
|
|
<pre>
|
|
<tt>sort -t : -k 3,3n /etc/passwd
|
|
</tt>
|
|
</pre>
|
|
</li>
|
|
|
|
<li>
|
|
<p>The following command prints the lines of the already sorted file <b>infile</b>, suppressing all but one occurrence of lines
|
|
having the same third field:</p>
|
|
|
|
<pre>
|
|
<tt>sort -um -k 3.1,3.0 infile
|
|
</tt>
|
|
</pre>
|
|
</li>
|
|
</ol>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_131_18"></a>RATIONALE</h4>
|
|
|
|
<blockquote>
|
|
<p>Examples in some historical documentation state that options <b>-um</b> with one input file keep the first in each set of lines
|
|
with equal keys. This behavior was deemed to be an implementation artifact and was not standardized.</p>
|
|
|
|
<p>The <b>-z</b> option was omitted; it is not standard practice on most systems and is inconsistent with using <i>sort</i> to sort
|
|
several files individually and then merge them together. The text concerning <b>-z</b> in historical documentation appeared to
|
|
require implementations to determine the proper buffer length during the sort phase of operation, but not during the merge.</p>
|
|
|
|
<p>The <b>-y</b> option was omitted because of non-portability. The <b>-M</b> option, present in System V, was omitted because of
|
|
non-portability in international usage.</p>
|
|
|
|
<p>An undocumented <b>-T</b> option exists in some implementations. It is used to specify a directory for intermediate files.
|
|
Implementations are encouraged to support the use of the <i>TMPDIR</i> environment variable instead of adding an option to support
|
|
this functionality.</p>
|
|
|
|
<p>The <b>-k</b> option was added to satisfy two objections. First, the zero-based counting used by <i>sort</i> is not consistent
|
|
with other utility conventions. Second, it did not meet syntax guideline requirements.</p>
|
|
|
|
<p>Historical documentation indicates that "setting <b>-n</b> implies <b>-b</b>". The description of <b>-n</b> already states
|
|
that optional leading <blank>s are tolerated in doing the comparison. If <b>-b</b> is enabled, rather than implied, by
|
|
<b>-n</b>, this has unusual side effects. When a character offset is used in a column of numbers (for example, to sort modulo 100),
|
|
that offset is measured relative to the most significant digit, not to the column. Based upon a recommendation from the author of
|
|
the original <i>sort</i> utility, the <b>-b</b> implication has been omitted from this volume of IEEE Std 1003.1-2001,
|
|
and an application wishing to achieve the previously mentioned side effects has to code the <b>-b</b> flag explicitly.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_131_19"></a>FUTURE DIRECTIONS</h4>
|
|
|
|
<blockquote>
|
|
<p>None.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_131_20"></a>SEE ALSO</h4>
|
|
|
|
<blockquote>
|
|
<p><a href="comm.html"><i>comm</i></a> , <a href="join.html"><i>join</i></a> , <a href="uniq.html"><i>uniq</i></a> , the System
|
|
Interfaces volume of IEEE Std 1003.1-2001, <a href="../functions/toupper.html"><i>toupper</i>()</a></p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_131_21"></a>CHANGE HISTORY</h4>
|
|
|
|
<blockquote>
|
|
<p>First released in Issue 2.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_131_22"></a>Issue 6</h4>
|
|
|
|
<blockquote>
|
|
<p>IEEE PASC Interpretation 1003.2 #174 is applied, updating the DESCRIPTION of comparisons.</p>
|
|
|
|
<p>IEEE PASC Interpretation 1003.2 #168 is applied.</p>
|
|
</blockquote>
|
|
|
|
<div class="box"><em>End of informative text.</em></div>
|
|
|
|
<hr>
|
|
<hr size="2" noshade>
|
|
<center><font size="2"><!--footer start-->
|
|
UNIX ® is a registered Trademark of The Open Group.<br>
|
|
POSIX ® is a registered Trademark of The IEEE.<br>
|
|
[ <a href="../mindex.html">Main Index</a> | <a href="../basedefs/contents.html">XBD</a> | <a href=
|
|
"../utilities/contents.html">XCU</a> | <a href="../functions/contents.html">XSH</a> | <a href="../xrat/contents.html">XRAT</a>
|
|
]</font></center>
|
|
|
|
<!--footer end-->
|
|
<hr size="2" noshade>
|
|
</body>
|
|
</html>
|
|
|