checkbib2.sh
public shellscript v1 · immutable#!/bin/bashBIBFILE=references.bibAUXFILE=report.auxTEMPAUX=$(mktemp)TEMPBIB=$(mktemp)echo "AUX: $AUXFILE => $TEMPAUX"egrep '^\\citation' $AUXFILE|sort|uniq \ |perl -ne 's#\\citation{(.*)}#$1#; print;' \ |sort|uniq > $TEMPAUXecho "BIB: $BIBFILE => $TEMPBIB"egrep '^@' $BIBFILE|sort|uniq \ |perl -ne 's#\@\S+\s*{\s*(\S+)\s*,#$1#; print;' \ |sort|uniq > $TEMPBIBecho "Comparing AUX with BIB (bib on the right). Using less pager."readdiff -y $TEMPAUX $TEMPBIB | less