diff options
author | David Seifert <soap@gentoo.org> | 2012-02-17 09:00:00 +0000 |
---|---|---|
committer | David Seifert <soap@gentoo.org> | 2012-02-17 09:00:00 +0000 |
commit | 008fb1e761e20336d42a19132292183e00909181 (patch) | |
tree | a28e0246f0b0404a5c066b8f2a888db45e30fc44 /test/table.lua | |
download | lua-patches-008fb1e761e20336d42a19132292183e00909181.tar.gz lua-patches-008fb1e761e20336d42a19132292183e00909181.tar.bz2 lua-patches-008fb1e761e20336d42a19132292183e00909181.zip |
Add upstream 5.1.5
Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'test/table.lua')
-rw-r--r-- | test/table.lua | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/table.lua b/test/table.lua new file mode 100644 index 0000000..235089c --- /dev/null +++ b/test/table.lua @@ -0,0 +1,12 @@ +-- 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") |