CondenseRules.awk 255 字节
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
BEGIN {
    previous="";
    prefix="";
    ORS="";
    OFS="";
} 
{
    if ($1 != previous) { 
	if (previous != "") {
	    print "\n\n";
	}
	previous = $1;
    	print $1;
	prefix="\t";
    }
    print prefix $2;
    prefix=" ";
}
END {
    print "\n";
}