sortbib
Sort bibliographic database entries
SYNOPSIS
sortbib [-b] [-f field] [-i nr] [-n keylen] [-o outfile] [-s keys] database...
PARAMETERS
-b
Suppress interactive messages during database searching.
-f field
Treat field as the sequence-control card. Allows you to use sequence numbers like report numbers, etc.
-i nr
Invert the order of references; useful to print references by reverse date.
-n keylen
Truncate keys to keylen characters. Default is to truncate after author keylen characters, title 6 characters, and date 6 characters.
-o outfile
Put output on outfile instead of standard output.
-s keys
Sort the references according to keys. The keys are a sequence of characters with the following meanings:
%A: Author(s).
%D: Date.
%J: Journal or series title.
%T: Title.
Other keys are possible as well, and dependent upon your database definition
database...
One or more bibliographic database files to be sorted.
DESCRIPTION
sortbib reads bibliographic databases, extracts keywords, and sorts entries based on specified criteria. It's primarily used for manipulating and organizing refer databases. The command generates a sorted index, making it easier to find specific entries within a large collection of bibliographic references. The sorting process relies on information stored within the database entries themselves, typically keywords, author names, or publication years. sortbib offers various options to customize the sorting order, output format, and extraction methods.
It allows users to interactively specify sort keys or use predefined formatting styles. sortbib can take multiple input database files, merging their contents during the sorting process. The command is part of a suite of tools designed to manage bibliographic information, and it is often used in conjunction with other tools like refer, lookbib, and indxbib.
CAVEATS
sortbib is heavily dependent on the format of the input database files. Incorrectly formatted entries or missing fields can lead to unexpected sorting results or errors. It is most effective with databases created by refer or similar tools that follow a consistent format. sortbib relies on keyword extraction which can be limited to the accuracy of these keywords inside the database files.
DEFAULT SORTING ORDER
If no sort keys are specified using the -s option, sortbib typically sorts by author, then title, and then date. This default behavior can vary depending on the specific implementation and the database format.
INTERACTIVE USE
Without -b sortbib will output prompts to standard error before sorting, it will ask whether to skip or not the sorting procedure. In non interactive modes no prompt will be displayed
HISTORY
sortbib is part of the Unix bibliographic toolset, initially developed at Bell Laboratories. It was created to assist researchers in managing and organizing their reference collections in the pre-internet era. The tool has been included in various Unix distributions and has been maintained and updated over time. It is widely used in academic and research environments for its ability to efficiently sort and index bibliographic data.