Created
April 10, 2019 13:29
-
-
Save LukeSmithxyz/ffd3f2ca1deac65423c2f32930294b65 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
sed " | |
s/title\s*=\s*{\(.*\)},*/%T \1/I | |
s/author\s*=\s*{\(.*\)},*/%A \1/I | |
s/publisher\s*=\s*{\(.*\)},*/%I \1/I | |
s/doi\s*=\s*{\(.*\)},*/%K \1/I | |
s/journal\s*=\s*{\(.*\)},*/%J \1/I | |
s/volume\s*=\s*{\(.*\)},*/%V \1/I | |
s/number\s*=\s*{\(.*\)},*/%N \1/I | |
s/pages\s*=\s*{\(.*\)},*/%P \1/I | |
s/year\s*=\s*\([0-9]*\),*/%D \1/I | |
s/^\s*//g | |
/^[^%]/d | |
s/\({\|}\)//g | |
" "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Interesting thing with hashbangs is that almost everything can be interpreter. Not very big optimization but... :) (v=bkgeFi4PwOg)