SORTBIB(1)

πŸ“¦ version 191015, in alpine 3.24

okay so bestie, you found sortbib(1) from the General Commands Manual β€” and it's literally here to sort your bibliographic database πŸ’– no cap, let's get into it.

πŸŽ€ NAME πŸŽ€

sortbib β€” sort bibliographic database

✨ SYNOPSIS ✨

sortbib [-s KEYS] database ...

πŸ’… DESCRIPTION πŸ’…

So here's the vibe: sortbib sorts files of records containing refer 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 database 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 sortbib may not be used in a pipeline to read standard input.

🚨 bestie, do not pipe this one into stdin β€” the manpage says sortbib may not be used in a pipeline to read standard input. Periodt.

By default, sortbib alphabetizes by the first %A and the %D fields, which contain the senior author and date. The -s option is used to specify new KEYS. For instance, --s ATD will sort by author, title, and date, while -s A+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.

sortbib 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 nroff 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. sortbib 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-significant field is absent from a record, sortbib places that record before other records containing that field.

🌈 SEE ALSO 🌈

πŸ¦‹ NOTES πŸ¦‹

Records with missing author fields should probably be sorted by title.

Written by Greg Shenaut & Bill Tuthill.


okay bye bestie 🫢 this page is Debian, dated December 12, 2005, and the footer is SORTBIB(1) β€” slay and goodbye πŸ’…βœ¨

πŸ“¦ where this page comes from