LukeSmithxyz / voidrice

My dotfiles (deployed by LARBS)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Getbib Script Bug

emrakyz opened this issue · comments

Getbib script still can't access data because of the space after "DOI:" as it can be seen in the screenshot.

image

I tested this same script with this case about a week ago, and I now use

sed -n '/[dD][oO][iI]:/{s/.*[dD][oO][iI]:\s*\(\S\+[[:alnum:]]\).*/\1/p;q}'

instead of the pipe into grep on my system. However stupid it looks, it's about 33% faster from my testing than just removing the white space after the grep like this:

grep -io "doi:\s*\S\+[[:alnum:]]" | tr -d "[:blank:]"

and gets the job done