DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: T h

⟦2db67e16d⟧ TextFile

    Length: 774 (0x306)
    Types: TextFile
    Names: »histconv.sh«

Derivation

└─⟦b20c6495f⟧ Bits:30007238 EUUGD18: Wien-båndet, efterår 1987
    └─⟦this⟧ »EUUGD18/General/Cubes/histconv.sh« 

TextFile

#! /bin/sh
#
#  This script is for converting cubes4.1 style history file to cubes5.1 style.
#  You must use this script if you were running cubes4.1 and wish to keep
#  the players' records intact.
#
awk '
BEGIN {
	MVGAMES = 25;
}
{
	split($1, x, ";"); games=x[1]; lastgame=x[2];
	if(games == 0) next;
	if(games < MVGAMES) mvgames = games;
	else mvgames = MVGAMES;

	wins=$2; points=$3; avgturn=$4;

	name=$5;
	for(n = 6;n <= NF;++n)
		name = name " " $n;

	mvwins = (10000 * wins * mvgames) / games;
	mvpoints = (points * mvgames) / games;
	mvavgturn = (avgturn * mvgames) / games;

	printf("L %5d %5d %10d %10d %6d %s\n", games, wins, points, avgturn, lastgame, name);
	printf("M %5d %5d %10d %10d %6d %s\n", mvgames, mvwins, mvpoints, mvavgturn, lastgame, name);
}
' $1