Data update

This commit is contained in:
Ingy döt Net 2025-02-27 18:35:13 -05:00
parent 8e4e15fa56
commit 72eb4943cb
1853 changed files with 35514 additions and 9441 deletions

View file

@ -0,0 +1,13 @@
-- Lua has no built in methods to handle csv files.
-- it does have string.gmatch, which we use to global.match whatever isn't a comma
print(io.read"l" .. ",SUM")
for line in io.lines() do
local fields, sum = {}, 0
for field in line:gmatch"[^,]+" do
table.insert(fields, field)
sum = sum + field
end
table.insert(fields, sum)
print(table.concat(fields,","))
end