BSD 4_3_Tahoe development
[unix-history] / usr / man / cat1 / sortbib.0
SORTBIB(1) UNIX Programmer's Manual SORTBIB(1)
N\bNA\bAM\bME\bE
sortbib - sort bibliographic database
S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
s\bso\bor\brt\btb\bbi\bib\bb [ -\b-s\bsKEYS ] database ...
D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
_\bS_\bo_\br_\bt_\bb_\bi_\bb sorts files of records containing _\br_\be_\bf_\be_\br key-letters
by user-specified keys. Records may be separated by blank
lines, or by .[ and .] delimiters, but the two styles may
not be mixed together. This program reads through each
_\bd_\ba_\bt_\ba_\bb_\ba_\bs_\be and pulls out key fields, which are sorted
separately. The sorted key fields contain the file pointer,
byte offset, and length of corresponding records. These
records are delivered using disk seeks and reads, so _\bs_\bo_\br_\bt_\bb_\bi_\bb
may not be used in a pipeline to read standard input.
By default, _\bs_\bo_\br_\bt_\bb_\bi_\bb alphabetizes by the first %A and the %D
fields, which contain the senior author and date. The -\b-s\bs
option is used to specify new _\bK_\bE_\bY_\bS. For instance, -\b-s\bsATD
will sort by author, title, and date, while -\b-s\bsA+D will sort
by all authors, and date. Sort keys past the fourth are not
meaningful. No more than 16 databases may be sorted
together at one time. Records longer than 4096 characters
will be truncated.
_\bS_\bo_\br_\bt_\bb_\bi_\bb sorts on the last word on the %A line, which is
assumed to be the author's last name. A word in the final
position, such as ``jr.'' or ``ed.'', will be ignored if the
name beforehand ends with a comma. Authors with two-word
last names or unusual constructions can be sorted correctly
by using the _\bn_\br_\bo_\bf_\bf convention ``\0'' in place of a blank. A
%Q field is considered to be the same as %A, except sorting
begins with the first, not the last, word. _\bS_\bo_\br_\bt_\bb_\bi_\bb sorts on
the last word of the %D line, usually the year. It also
ignores leading articles (like ``A'' or ``The'') when sort-
ing by titles in the %T or %J fields; it will ignore arti-
cles of any modern European language. If a sort-significant
field is absent from a record, _\bs_\bo_\br_\bt_\bb_\bi_\bb places that record
before other records containing that field.
S\bSE\bEE\bE A\bAL\bLS\bSO\bO
refer(1), addbib(1), roffbib(1), indxbib(1), lookbib(1)
A\bAU\bUT\bTH\bHO\bOR\bRS\bS
Greg Shenaut, Bill Tuthill
B\bBU\bUG\bGS\bS
Records with missing author fields should probably be sorted
by title.
Printed 7/9/88 April 29, 1985 1