Skip to content

Instantly share code, notes, and snippets.

@otrack
Created August 30, 2022 09:27
Show Gist options
  • Save otrack/0516310695a9115063f96ee9dc217d25 to your computer and use it in GitHub Desktop.
Save otrack/0516310695a9115063f96ee9dc217d25 to your computer and use it in GitHub Desktop.
WHO=psutra
DBLP_ALIAS=09/5760
BIB_ALIAS=ps
wget --quiet https://dblp.org/pid/${DBLP_ALIAS}.bib?param=1 -O ${WHO}.bib
i=$(grep DBLP: ${WHO}.bib | wc -l)
while [[ $(grep -q DBLP: ${WHO}.bib; echo $?) -eq 0 ]];
do
sed 0,/DBLP:[^,]*/s/DBLP:[^,]*/${BIB_ALIAS}${i}/ -i ${WHO}.bib
i=$((i-1))
done
biber -q --tool --output_align --output_indent=2 --output_fieldcase=lower ${WHO}.bib
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment