morpheus-base

morpheus base system
git clone git://git.2f30.org/morpheus-base.git
Log | Files | Refs

sort.1 (1487B)


      1 .TH SORT 1 sbase\-VERSION
      2 .SH NAME
      3 sort \- sort lines
      4 .SH SYNOPSIS
      5 .B sort
      6 .RB [ \-bnru ]
      7 .RB [ \-t
      8 .IR delim ]
      9 .RB [ \-k
     10 .IR key ]...
     11 .RI [ file ...]
     12 .SH DESCRIPTION
     13 .B sort
     14 writes the sorted concatenation of the given files to stdout.  If no file is
     15 given, sort reads from stdin.
     16 .SH OPTIONS
     17 .TP
     18 .B \-C
     19 check that the concatenation of the given files is sorted rather than sorting
     20 them.  In this mode, no output is printed to stdout, and the exit status
     21 indicates the result of the check.
     22 .TP
     23 .B \-b
     24 skip leading whitespace of columns when sorting.
     25 .TP
     26 .B \-c
     27 the same as
     28 .B \-C
     29 except that when disorder is detected, a message is printed to stderr
     30 indicating the location of the disorder.
     31 .TP
     32 .BI \-k \ key
     33 specifies a key definition of the form
     34 .BR S [. s ][ f ][, E [. e ][ f ]]
     35 where
     36 .BR S ,
     37 .BR s ,
     38 .BR E ,
     39 and
     40 .B e
     41 are the starting column, starting character in that column, ending column and
     42 the ending character of that column respectively.  If they are not specified,
     43 .B s
     44 refers to the first character of the specified starting column,
     45 .B E
     46 refers to the last column of every line, and
     47 .B e
     48 refers to the last character of that last column.
     49 .B f
     50 can be used to specify options
     51 .RB ( n ,
     52 .BR b )
     53 that only apply to this key definition.
     54 .B b
     55 is special in that it only applies to the column that it was specified after.
     56 .TP
     57 .B \-n
     58 perform a numeric sort.
     59 .TP
     60 .B \-r
     61 reverses the sort.
     62 .TP
     63 .BI \-t \ delim
     64 specifies the field delimiter.
     65 .TP
     66 .B \-u
     67 prints equal lines only once.