ncdump2tsv (240B)
1 #!/usr/bin/awk -f 2 3 { 4 if (match($0, /^}$/)) 5 isdata = 0 6 7 if (isdata) { 8 gsub(/, /, "\t", $0) 9 gsub(/,$/, "", $0) 10 gsub(/^ */, "", $0) 11 gsub(/ *;/, "", $0) 12 print 13 } 14 15 if (match($0, /^data:$/)) { 16 getline 17 getline 18 isdata = 1 19 } 20 }