diff --git a/bin/format.awk b/bin/format.awk new file mode 100755 index 0000000..36338f6 --- /dev/null +++ b/bin/format.awk @@ -0,0 +1,30 @@ +#!/usr/bin/awk -f + +BEGIN { + data = "" +} + +/^\[/ || /^\]/ { + print "oups" + next +} + +/^ {/ && /},$/ { + print $0 + next +} + +/^ {/ { + data = $0 + next +} + +/},$/ { + data = sprintf("%s %s", data, $0) + print data + next +} + +{ + data = sprintf("%s %s", data, $0) +}