From 400b30c947dbff3b4d8318e83ff66395fbe1f434 Mon Sep 17 00:00:00 2001 From: KatolaZ Date: Tue, 7 Jan 2020 15:35:30 +0000 Subject: remove leading blanks from fields --- bib2tsv | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bib2tsv b/bib2tsv index 0dafc7a..f460843 100755 --- a/bib2tsv +++ b/bib2tsv @@ -12,15 +12,18 @@ cat | awk ' } /^@.*\{/{ - cur =$0 + gsub("^[[:blank:]]+", "") + cur=$0 } /^\}[ ]*$/{ - print cur"\t"$0 + gsub("/^[[:blank:]]+/", "") + print cur"\t"$0"\n" } /^[ ]*.*=.*/{ + gsub("^[[:blank:]]+", "") cur=cur"\t"$0; } ' -- cgit v1.2.3