Skip to content

Instantly share code, notes, and snippets.

@telemachus telemachus/sorter.lua
Last active Dec 25, 2015

Embed
What would you like to do?
io.input(arg[1])
io.output(io.open(arg[2], 'w'))
lines = {}
for line in io.lines() do lines[#lines+1] = line end
table.sort(lines)
for _, line in ipairs(lines) do io.write(line, "\n") end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.