I use BibDesk to manage my references, including through auto-filing the corresponding PDF files on disk.

As a result, my .bib files contain several extra fields such as added/modified dates and encoded file paths, as in this example:

@article{xyz17, Author = {X, Y and Y, Z}, Date-Added = {2017-05-17 16:28:24 +0000}, Date-Modified = {2017-05-17 16:29:46 +0000}, Doi = {10.xxxx/xxx-2017-0001}, Journal = {Foo}, Keywords = {Bar}, Number = {1}, Title = {Hello World}, Year = {2017}, Bdsk-File-1 = {YnBsaXN0MDDUAQIDBAUG ... AAAAAAAAAAAAEIA==}}

Fortunately, BibDesk lets me export my .bib files as "minimal BibTeX" that contains only the essential fields:

@article{xyz17, Author = {X, Y and Y, Z}, Journal = {Foo}, Number = {1}, Title = {Hello World}, Year = {2017}}

I would like to be able to create such "minimal BibTeX" exports programmatically, through the command line. Thus my question:

Is there a command-line utility to save BibTeX files stripped down to a selection of fields?

  • 1
    You can always try sed
    – Marijn
    May 21, 2017 at 17:08
  • From what? ....
    – cfr
    May 21, 2017 at 23:29
  • @Marijn Thanks. I'll do my best to code up something myself, then :-)
    – Fr.
    May 21, 2017 at 23:34
  • @cfr I'm sorry, but I don't get your comment.
    – Fr.
    May 21, 2017 at 23:35
  • 1
    From one of the related questions (tex.stackexchange.com/a/87732/89417): you can also use biber standalone, that may be easier and more robust.
    – Marijn
    May 22, 2017 at 7:57

1 Answer 1


The comments on the question already provided these good solutions:

In addition to the previously mentioned solutions:

  • @cfr Good idea, I've converted it! I would have just added to the comments, but I didn't have enough reputation to comment on the question.
    – Big Mac
    Jun 1, 2017 at 2:47
  • @cfr In a comment on the question, you advised against BibDesk. Is there a GUI reference manager that you recommend?
    – Big Mac
    Jun 1, 2017 at 3:36
  • I was being somewhat flippant. When I used it, I discovered its own developers said people shouldn't use it for, say, a dissertation. Since I was in the middle of my PhD at the time, that pretty much did it. I didn't like it because it messed up hand-edited files and wouldn't let me do things in a way that I wanted to do them to ensure consistency. I'm also reluctant to recommend any software which is platform-specific. JabRef has a good reputation, but I just use scripts (including the gawk and sed disparaged in the comments above) and my TeX editor.
    – cfr
    Jun 1, 2017 at 3:45
  • @cfr If any BibDesk developer said that, it was a joke, and I regret the misunderstanding. Mike McCracken wrote BibDesk for use with his dissertation, and it's all I used when I was writing mine (though I fixed a few bugs in it along the way). Of course it alters hand-edited files, but consider that this mess @article( testcitekey , title="My Title", author={von Some{\"o}ne, Me},month=jun, year=2016 ) is valid BibTeX. It's nearly impossible to preserve idiosyncrasies of hand-edited BibTeX (preserving macros was hard enough). Jun 1, 2017 at 15:43
  • I can see why BibDesk is not for everyone, since it's Mac-only, but I've used BibDesk for a decade, and it's a beloved part of my personal knowledge management ecosystem. Since the data is just BibTeX that I know how to manipulate with numerous tools, I'm confident that I could switch to other software in the future if necessary.
    – Big Mac
    Jun 1, 2017 at 22:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .