Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
ElmerCSC
GitHub Repository: ElmerCSC/elmerfem
Path: blob/devel/contrib/lua-5.1.5/test/table.lua
3203 views
1
-- make table, grouping all data for the same item
2
-- input is 2 columns (item, data)
3
4
local A
5
while 1 do
6
local l=io.read()
7
if l==nil then break end
8
local _,_,a,b=string.find(l,'"?([_%w]+)"?%s*(.*)$')
9
if a~=A then A=a io.write("\n",a,":") end
10
io.write(" ",b)
11
end
12
io.write("\n")
13
14