From e0d092afafaed0abb80e7dd448379abf7562cd8d Mon Sep 17 00:00:00 2001 From: KatolaZ Date: Sun, 5 Jan 2020 15:38:56 +0000 Subject: add bib2tsv --- bib2tsv | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 bib2tsv diff --git a/bib2tsv b/bib2tsv new file mode 100755 index 0000000..0dafc7a --- /dev/null +++ b/bib2tsv @@ -0,0 +1,26 @@ +#!/bin/sh + + +# +# convert a bibtex entry into a single record (tsv) +# + +cat | awk ' + +/^%/{ + next +} + +/^@.*\{/{ + cur =$0 +} + + +/^\}[ ]*$/{ + print cur"\t"$0 +} + +/^[ ]*.*=.*/{ + cur=cur"\t"$0; +} +' -- cgit v1.2.3