compare contents of file with those of a directory
Hi,
I'm struggling with a task that seems perfect for awk, as is usually the
case with BibTeX files. The file has thousands of entries like this:
@ARTICLE{913,
author = {Doe, J.},
title = {title},
journal = {some journal},
year = {1492},
volume = {30},
pages = {40-50},
key = {913},
pdf = {filename.pdf}
}
Many entries already have that last 'pdf' line, but a lot of entries need
to have that line added. The file names are the base names (without the
directory) of files available in some directory. The idea is therefore to
find which files in the directory with the pdf files do not have a 'pdf'
line entry somewhere on the BibTeX file.
I know how I can get a list of the file names already in the BibTeX file,
but am not sure how to proceed from there. I would highly appreciate some
suggestions on how to approach this. Thanks in advance.
Cheers,
--
Seb
|