I recently installed bibexport on my mac (10.5). This command lets you export a small document-specific .bib file using only the references that you cite in that particular document. This is useful for sharing references with coauthors, for example.

My question is, what is the best way to install bibexport on a mac?

I eventually succeeded, but only after jumping through several hoops, like recompiling the "sed" command. I would love to hear from other users how to avoid these difficulties.


You probably did the best thing by installing GNU sed (I supposed it's the implementation of sed you chose). GNU/Linux and Mac OS X have incompatible versions of sed; in the case of bibexport it seems to be the -r switch that isn't supported by Mac OS X's sed (inherited from BSD sed).

Of course, a still better way would be to convince the author of bibexport to make his script more portable (BSD sed seems to have a -E switch that may be more or less the same as GNU sed's -r).


bibexport is a shell script, so it requires no compilation at all. Just place it somewhere in your PATH and make sure you set the permissions to make it an executable. It works for me.

  • I think you need to copy export.bst and expkeys.bst somewhere where bibtex can find them? – Jukka Suomela Aug 4 '10 at 14:55
  • He didn't write about compiling bibexport; he mentioned compiling sed. And for good reasons; see my answers. – Arthur Reutenauer Aug 4 '10 at 15:44
  • I take it as given that one installs the GNU textools in any *nix system! – José Figueroa-O'Farrill Aug 4 '10 at 17:17
  • @Jukka: indeed. – José Figueroa-O'Farrill Aug 4 '10 at 17:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.