summaryrefslogtreecommitdiff
path: root/bib2tsv
blob: 0dafc7a9634f218190c14ae5bf1e3f1dabb6a202 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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;
}
'