SORTBIB(1) SORTBIB(1) NAME sortbib - sort bibliographic database SYNOPSIS sortbib [ -sKEYS ] database ... DESCRIPTION _S_o_r_t_b_i_b sorts files of records containing _r_e_f_e_r 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 pro‐ gram reads through each _d_a_t_a_b_a_s_e 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 _s_o_r_t_b_i_b may not be used in a pipeline to read standard input. By default, _s_o_r_t_b_i_b alphabetizes by the first %A and the %D fields, which contain the senior author and date. The -s option is used to specify new _K_E_Y_S. For instance, -sATD will sort by author, title, and date, while -sA+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. _S_o_r_t_b_i_b 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 _n_r_o_f_f 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. _S_o_r_t_b_i_b sorts on the last word of the %D line, usually the year. It also ignores leading articles (like ‘‘A’’ or ‘‘The’’) when sorting by titles in the %T or %J fields; it will ignore articles of any modern European language. If a sort-sig‐ nificant field is absent from a record, _s_o_r_t_b_i_b places that record before other records containing that field. SEE ALSO refer(1), addbib(1), roffbib(1), indxbib(1), lookbib(1) AUTHORS Greg Shenaut, Bill Tuthill BUGS Records with missing author fields should probably be sorted by title. 4.2 Berkeley Distribution April 29, 1985 SORTBIB(1)