I'm creating a code for the automatic extraction of bib records from scientific papers.
In an old version of the script i gave in input the name of the folder where all the pdfs were stored, now I want to give a regex. E.g. before:
./AutoBib.sh Papers/
Now:
./Autobib.sh Papers/*.pdf
In the folder there are, for example 3 pdf files: Shrek.pdf, Fiona.pdf, Donkey.pdf, using my script I should be able to retrieve the doi from all files creating a file where all doi are listed but executing my script it returns the doi of the first file and nothing more.
Here there is my code:
for i in $1; do
doi $i
done
doi is a function that extract the doi from a pdf and puts it in a txt file. When i run the script it returns me only the doi of the first file.
How can I feed a regex in my script and being able to iterate though all files that matches that regex?
