%% /u/sy/beebe/tex/bibsort/README, Thu Jun  9 13:16:28 1994
%% Edit by Nelson H. F. Beebe <beebe@plot79.math.utah.edu>

This directory contains bibsort, a UNIX tool for sorting BibTeX
bibliography files.  The contents are:

Makefile	UNIX makefile
README		This file
bibsort.hlp	ASCII text file with formatted manual pages in VAX VMS
		HELP format
bibsort.man	manual pages (nroff/troff input)
bibsort.ps	PostScript version of typeset manual pages
bibsort.sh	bibsort program, implemented as a UNIX sh script using
		nawk, egrep, sort, and, tr.
bibsort.txt	ASCII text file with formatted manual pages
man2ps		UNIX shell script for directing conversion of nroff/troff
		files to PostScript
rofvms.awk	AWK script to convert .txt file to .hlp file


========
PROBLEMS
========

On HP-9000/735 systems running HP-UX 9.0.1, I had been using nawk via
a symbolic link to /usr/bin/awk.  Unfortunately, when I added the
additional regular-expression patterns [ \t]* to the awk program in
bibsort.sh, this failed: the HP awk complained:

nawk: duplication operator in illegal position

 source line number 9
 context is
        /^[ \t]*@[ \t]*[Pp][Rr][Ee][Aa][Mm][Bb][Ll][Ee][  >>>   ]*{/ <<<  {

This is either a bug in the HP regular expression library, or a
limitation of an older version of HP awk.

I next attempted switching to GNU gawk version 2.15 on this system,
but that failed too.  I finally replaced the /usr/local/bin/nawk
symbolic link to /usr/bin/awk with a compiled version from nawk source
code licensed from AT&T, with files dated December 1991 and December
1987, clearly an ancient version, but it did the trick.

If you need to run bibsort on HP-UX 9.x.x, you probably won't be able
to readily repeat what I did, unless you order nawk sources from AT&T
(about US$100 when I did so), so I suggest installing a modified copy
of bibsort.sh as bibsort, with the patterns [ \t]* eliminated from all
but the initial position in the awk program.  If your bibliography
files have been prettyprinted by bibclean, there will be no whitespace
in the positions matched by those patterns, so the change should not
prove to be a serious limitation.
