AT&T UNIX™PC Unix System V Users Manual - tenox
AT&T UNIX™PC Unix System V Users Manual - tenox AT&T UNIX™PC Unix System V Users Manual - tenox
SORT ( l ) SORT ( l ) NAME sort - sort and/or merge files SYNOPSIS sort [-cmubdtinrtx] [+pos1 [-pos2JI • • • [-o output] [names] DESCRIPTION Sort sorts lines of all the named files together and writes the result on the standard output. The name - means the standard input. If no input files are named, the standard input is sorted. The default sort key is an entire line. Default ordering is lexicographic by bytes in machine collating sequence. The ordering is affected globally by the following options, one or more of which may appear. b Ignore leading blanks (spaces and tabs) in field comparisons. d "Dictionary" order: only letters, digits and blanks are significant in comparisons. f Fold upper case letters onto lower case. Ignore characters outside the ASCII range 040-0176 in nonnumeric comparisons. n An initial numeric string, consisting of optional blanks, optional minus sign, and zero or more digits with optional decimal point, is sorted by arithmetic value. Option n implies option b. r Reverse the sense of comparisons. tx "Tab character" separating fields is x. The notation +pos1 -pos2 restricts a sort key to a field beginning at pos1 and ending just before pos2. Pos1 and pos2 each have the form m.n, optionally followed by one or more of the flags bdtinr, where m tells a number of fields to skip from the beginning of the line and n tells a number of characters to skip further. If any flags are present they override all the global ordering options for this key. If the b option is in effect n is counted from the first non-blank in the field; b is attached independently to pos2. A missing .n means .0; a missing -pos2 means the end of the line. Under the -tx option, fields are strings separated by x; otherwise fields are non-empty non-blank strings separated by blanks. When there are multiple sort keys, later keys are compared only after all earlier keys compare equal. Lines that otherwise compare equal are ordered with all bytes significant. These option arguments are also understood: c Check that the input file is sorted according to the ordering rules; give no output unless the file is out of sort. m Merge only, the input files are already sorted. u Suppress all but one in each set of equal lines. Ignored bytes and bytes outside keys do not participate in this comparison. - 1 -
- Page 484 and 485: PTX ( 1) PTX ( 1) SEE ALSO nroff( l
- Page 487 and 488: REGCMP ( 1 ) REGCMP (l) NAME regcmp
- Page 489: RM ( l ) RM (l) NAME rm, rmdir - re
- Page 492 and 493: I�
- Page 495: SCCSDIFF ( 1 ) SCCSDIFF ( 1 ) NAME
- Page 499 and 500: SDB ( l ) SDB ( 1) NAME sdb - symbo
- Page 501 and 502: � I SDB ( 1) SDB ( 1) file may ov
- Page 503 and 504: SDB ( 1) SDB ( 1) e directory file-
- Page 505 and 506: SDB ( 1 ) SDB ( 1 ) execution. B Pr
- Page 507: SDB ( 1 ) SDB ( 1 ) WARNINGS BUGS W
- Page 510 and 511: SDIFF ( 1) SDIFF(l) On exit from th
- Page 512 and 513: SED ( 1) SED ( 1) In the following
- Page 515 and 516: SETPRINT ( 1 ) SETPRINT ( 1 ) NAME
- Page 517 and 518: -� SH ( l ) NAME SH ( l ) sh, rsh
- Page 519 and 520: SH ( 1 ) SH(l) positional parameter
- Page 521 and 522: SH ( 1 ) word >> word
- Page 523 and 524: SH ( 1 ) SH ( 1) cd [ arg ] Change
- Page 525 and 526: SH (l) SH (l) Invocation . If the s
- Page 527 and 528: SHFORM (I) {AT&T UNIX PC only ) SHF
- Page 529 and 530: ( \ SHFORM(I) (AT&T UNIX PC only )
- Page 531 and 532: SIZE ( 1 ) SIZE ( 1) NAME size - pr
- Page 533: �· ! SLEEP (I) SLEEP (I) NAME sl
- Page 537 and 538: SPELL ( 1) SPELL (l) NAME spell, ha
- Page 539 and 540: SPLIT ( 1) SPLIT ( 1) NAME split -
- Page 541: STRIP ( 1 ) STRIP (1) NAME strip -
- Page 544 and 545: STTY ( 1) ixon ( -ixon) ixa.ny ( -i
- Page 547 and 548: SU ( 1) SU ( l ) NAME su - become s
- Page 549 and 550: SUM ( 1 ) SUM ( 1) NAME sum - print
- Page 551 and 552: SYNC ( 1) NAME sync - update the su
- Page 553 and 554: TABS ( l ) TABS ( l ) NAME tabs - s
- Page 555 and 556: TABS (l) TABS (l) unknown tab code
- Page 557: TAIL ( l) TAIL ( 1) NAME tail - del
- Page 560 and 561: TAR ( 1) TAR ( 1) FILES r causes ta
- Page 562 and 563: TBL(l) TBL(l) If a data line consis
- Page 564 and 565: It) I�
- Page 570 and 571: � "'-·�r•'
- Page 572 and 573: I I I I I I I I I I I I I I I I I I
- Page 574 and 575: TEST ( 1) TEST (l) SEE ALSO find(l)
- Page 576 and 577: :)\ ... .._
- Page 579: TR ( l ) TR ( l ) NAME tr - transla
- Page 582 and 583: I I I I I I I I I I I I I I I I I I
SORT ( l ) SORT ( l )<br />
NAME<br />
sort - sort and/or merge files<br />
SYNOPSIS<br />
sort [-cmubdtinrtx] [+pos1 [-pos2JI • • • [-o output] [names]<br />
DESCRIPTION<br />
Sort sorts lines of all the named files together and writes the<br />
result on the standard output. The name - means the standard<br />
input. If no input files are named, the standard input is sorted.<br />
The default sort key is an entire line. Default ordering is lexicographic<br />
by bytes in machine collating sequence. The ordering is<br />
affected globally by the following options, one or more of which<br />
may appear.<br />
b Ignore leading blanks (spaces and tabs) in field comparisons.<br />
d "Dictionary" order: only letters, digits and blanks are<br />
significant in comparisons.<br />
f Fold upper case letters onto lower case.<br />
Ignore characters outside the ASCII range 040-0176 in nonnumeric<br />
comparisons.<br />
n An initial numeric string, consisting of optional blanks,<br />
optional minus sign, and zero or more digits with optional<br />
decimal point, is sorted by arithmetic value. Option n<br />
implies option b.<br />
r Reverse the sense of comparisons.<br />
tx "Tab character" separating fields is x.<br />
The notation +pos1 -pos2 restricts a sort key to a field beginning<br />
at pos1 and ending just before pos2. Pos1 and pos2 each<br />
have the form m.n, optionally followed by one or more of the<br />
flags bdtinr, where m tells a number of fields to skip from the<br />
beginning of the line and n tells a number of characters to skip<br />
further. If any flags are present they override all the global ordering<br />
options for this key. If the b option is in effect n is counted<br />
from the first non-blank in the field; b is attached independently<br />
to pos2. A missing .n means .0; a missing -pos2 means the end<br />
of the line. Under the -tx option, fields are strings separated by<br />
x; otherwise fields are non-empty non-blank strings separated by<br />
blanks.<br />
When there are multiple sort keys, later keys are compared only<br />
after all earlier keys compare equal. Lines that otherwise compare<br />
equal are ordered with all bytes significant.<br />
These option arguments are also understood:<br />
c Check that the input file is sorted according to the ordering<br />
rules; give no output unless the file is out of sort.<br />
m Merge only, the input files are already sorted.<br />
u Suppress all but one in each set of equal lines. Ignored bytes<br />
and bytes outside keys do not participate in this comparison.<br />
- 1 -