Robert Clipsham Wrote: > bearophile wrote: > > I don't like XML; a small txt table is so easy to process with three lines > > of Python... :-) > > (Json is fine too). > > If you would like to provide me with a script to convert the xml file to > a text table, I'll happily run it and make it available to you. As it is > I'm too lazy to write such a thing myself. The xml file will be up in > about 5 minutes at http://dbench.octarineparrot.com/results.xml .
I think this will suffice: $ sed 's/<[^>]*>//g; /^$/d' < data | sed 'N; N; N; N; N; N; s/\n/ /g' It'll strip XML tags, blank lines an remove all but every 7th line feeds. You'll get the following output: http://stashbox.org/448426/out.txt You can use AWK to process it. For example: $ awk '/dmd/ {dmd += $5;} /gdc/ {gdc += $5;} /ldc/ {ldc += $5;} END {print "DMD: " dmd/1024 "M\nGDC: " gdc/1024 "M\nLDC: " ldc/1024 "M"}' < out.txt Outputs: DMD: 170.672M GDC: 169.398M LDC: 189.977M