This question already has an answer here:
My colleague asked me to write a page for a paper he writes. I wrote the page in LyX, compiled it to LaTeX, and sent him the TeX files. Then he reminded me that I forgot to send the .bib file with all the references.
But, my .bib file is huge - it contains over 1000 references (I have a global BiBTeX file for all my papers). The page I wrote uses only about 20 of them.
Is there an automatic way to extract from the bib file, only the records relevant to the current paper?