summaryrefslogtreecommitdiff
path: root/bib2tsv
diff options
context:
space:
mode:
authorKatolaZ <katolaz@freaknet.org>2020-01-07 15:35:30 +0000
committerKatolaZ <katolaz@freaknet.org>2020-01-07 15:35:30 +0000
commit400b30c947dbff3b4d8318e83ff66395fbe1f434 (patch)
tree298d7110497740aa5c9f6bb712776753b4176f52 /bib2tsv
parent72db941b1ccaf248a2d0823fc4f07df85e2b35c4 (diff)
remove leading blanks from fields
Diffstat (limited to 'bib2tsv')
-rwxr-xr-xbib2tsv7
1 files 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;
}
'