2 .\" Copyright (c) 1992, Sun Microsystems, Inc.
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH SORTBIB 1 "Sep 14, 1992"
8 sortbib \- sort a bibliographic database
12 \fBsortbib\fR [\fB-s\fR \fIKEYS\fR] \fIdatabase\fR...
18 \fBsortbib\fR sorts files of records containing \fBrefer\fR key-letters by
19 user-specified keys. Records may be separated by blank lines, or by
20 `\fB\&.[\fR' and `\fB\&.]\fR' delimiters, but the two styles may not be mixed
21 together. This program reads through each \fIdatabase\fR and pulls out key
22 fields, which are sorted separately. The sorted key fields contain the file
23 pointer, byte offset, and length of corresponding records. These records are
24 delivered using disk seeks and reads, so \fBsortbib\fR may not be used in a
25 pipeline to read standard input.
28 The most common key-letters and their meanings are given below.
44 Book containing article referenced
53 City (place of publication)
71 Editor of book containing article referenced
80 Footnote number or label (supplied by \fBrefer\fR)
89 Government order number
98 Header commentary, printed before reference
116 Journal containing article
125 Keywords to use in locating reference
134 Label field used by \fB-k\fR option of \fBrefer\fR
143 Bell Labs Memorandum (undefined)
161 Other commentary, printed at end of reference
179 Corporate or Foreign Author (unreversed)
188 Report, paper, or thesis (unpublished)
206 Title of article or book
224 Abstract \(em used by \fBroffbib\fR, not by \fBrefer\fR
233 Ignored by \fBrefer\fR
238 By default, \fBsortbib\fR alphabetizes by the first \fB%A\fR and the \fB%D\fR
239 fields, which contain the senior author and date.
242 \fBsortbib\fR sorts on the last word on the \fB%A\fR line, which is assumed to
243 be the author's last name. A word in the final position, such as `\fBjr.\fR' or
244 `\fBed.\fR', will be ignored if the name beforehand ends with a comma. Authors
245 with two-word last names or unusual constructions can be sorted correctly by
246 using the \fBnroff\fR convention `\fB\e0\fR\&' in place of a blank. A \fB%Q\fR
247 field is considered to be the same as \fB%A\fR, except sorting begins with the
248 first, not the last, word. \fBsortbib\fR sorts on the last word of the \fB%D\fR
249 line, usually the year. It also ignores leading articles (like `\fBA\fR' or
250 `\fBThe\fR') when sorting by titles in the \fB%T\fR or \fB%J\fR fields; it will
251 ignore articles of any modern European language. If a sort-significant field is
252 absent from a record, \fBsortbib\fR places that record before other records
253 containing that field.
256 No more than 16 databases may be sorted together at one time. Records longer
257 than 4096 characters will be truncated.
262 \fB\fB-s\fR\fIKEYS\fR\fR
265 Specify new \fIKEYS\fR. For instance, \fB-sATD\fR will sort by author, title,
266 and date, while \fB-sA+D\fR will sort by all authors, and date. Sort keys past
267 the fourth are not meaningful.
273 \fBaddbib\fR(1), \fBindxbib\fR(1), \fBlookbib\fR(1), \fBrefer\fR(1),
274 \fBroffbib\fR(1), \fBattributes\fR(5)
278 Records with missing author fields should probably be sorted by title.