#!/bin/sh
# usage: selmin < data
# within each data run, outputs only the fastest entry
exec nawk '
function end_data() {
	if( cur_data != "" ) {
		printf("data %s\n", cur_data);
		cur_data = "";
	}
	}
BEGIN	{
	cur_data = "";
	}
$1 == "runtime" {
	end_data();
	printf("runtime %s\n", $2);
	}
$1 == "example" {
	end_data();
	printf("example %s\n", $2);
	}
$1 == "data" {
	if( cur_data == "" || $2 < cur_data )
		cur_data = $2;
	}
END	{
	end_data();
	}
'
