=== removed file 'data' --- data 2013-09-11 23:26:09 +0000 +++ data 1970-01-01 00:00:00 +0000 @@ -1,6 +0,0 @@ -foo=bar -spam=[ -name value eggs -hello world 12 -fish thanks 42 -] === removed file 'data.awk' --- data.awk 2013-09-11 23:26:09 +0000 +++ data.awk 1970-01-01 00:00:00 +0000 @@ -1,54 +0,0 @@ -#!/bin/awk -f -BEGIN { - IFS="\t" - SUBSEP=":" - state = 0 - # 0 read normal variables - # 1 seen start of field list, read titles - # 2 reading list values - ident_re = /[a-zA-Z_][a-zA-Z0-9_]*/ -} - -$0 == "]" && state == 2 { - # end of field list - state = 0 - next -} - -state == 2 { - V[varname,list_n++] = $0 - next -} - -state == 1 { - V[varname,"fields"] = $0 - list_n = 1 - next -} - -/[a-zA-Z_][a-zA-Z0-9_]*=\[$/ { - # start of field list - state = 1 - m = match(ident_re) - varname = substr($0, m, RLENGTH) - next -} - -/[a-zA-Z_][a-zA-Z0-9_]*=/ { - m = match(ident_re) - varname = substr($0, m, RLENGTH) - V[varname] = substr($0, m+1+RLENGTH) - next -} - -/\t/ { - V[varname] = V[varname] "\n" substr($0, 1) -} - -# TODO error - -END { - for(key in V) { - printf("s\ts\n", key, V[key]) - } -} === removed file 'hello2.aat' --- hello2.aat 2013-09-11 23:26:09 +0000 +++ hello2.aat 1970-01-01 00:00:00 +0000 @@ -1,9 +0,0 @@ -|!/bin/awk -f -|BEGIN { -| split("Jack Joe Jonathan", names) -| FOR name IN names -Hello {{name}}{{is_last ? "!" : ","}} -| ENDFOR - -Welcome to the world of {{toupper("awk")}} templating! -|}