dnsmanager/bin/fix-last-element.awk

23 lines
154 B
Awk
Raw Permalink Normal View History

#!/usr/bin/awk -f
BEGIN {
data = ""
}
/^\]/ {
gsub("},$","}",data)
print data
print
next
}
/},$/ {
print data
data = $0
next
}
{
data = $0
}