working again - readonly

This commit is contained in:
2025-06-05 10:12:17 +02:00
parent 79930608f2
commit 1dc4c3b0bc
9 changed files with 801 additions and 107 deletions

17
src/awk/merge.awk Normal file
View File

@@ -0,0 +1,17 @@
BEGIN { FS="|"; i=0; dlt = -259200; spw = 604800; }
NR == FNR {
i = i + 1;
from[i] = int(($1 + dlt)/ spw);
getline;
to[i] = int(($1 + dlt) / spw);
next
} # Load start and end week numbers from first file
{
if (from[FNR] > to[FNR])
print "FNR", FNR, ":", from[FNR],"-",to[FNR], " ",$0;
for(i=from[FNR]; i<=to[FNR]; i++) {
week[i] = week[i] ? week[i] ";" $4 : $4
}
}
END { for (i in week) print i, week[i]; }