| Linux webhost1.zalaszam.hu 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 Path : /usr/share/doc/lua50/examples/ |
| Current File : //usr/share/doc/lua50/examples/table.lua |
-- make table, grouping all data for the same item
-- input is 2 columns (item, data)
local A
while 1 do
local l=io.read()
if l==nil then break end
local _,_,a,b=string.find(l,'"?([_%w]+)"?%s*(.*)$')
if a~=A then A=a io.write("\n",a,":") end
io.write(" ",b)
end
io.write("\n")