The -s option passes @string defintions through. By default, they're eaten.
Searches can be limited to particular bibtex fields with the -f option.
If no bibfiles are specified, all bibtex files in the path BIBINPUTS are used. A - for bibfiles reads a bibtex database from standard input.
To do "and" searches on two fields use shell pipes, reading the output of one search as the bibliography of the second (using `-' for bibfiles in a pipeline). For example, to find what someone named Kafka wrote about emacs keyboard layout, do:
To do "or" searches, use regular expressions. For example, you could be concerned with only careful authors, like Kunth and Kafka:
More sophisticated searches can be achieved by combining these techniques.
Multiple bibtex fields on one line will be missed.
There should be a way of switching off the file name prefixing when searching multiple files. For now, simply cat the files into lookbib.
This program does not implement a full bibtex parser, just a good approximation. Because of this, it may fail on unusual bibtex files. In particular, the @ that begins a bibtex entry, and the } which end it must be the first non-whitespace character on their line, or they will be missed. Also, multi-line fields surrounded with double quotes or curley brackets are handled correctly, but ugly combinations of quotes and brackets and backslashed versions of the same may fail. Umlaut accents are removed from the search string.
I make no predictions as to how this program will react to bibtex files with syntax errors.