print("CREATE TABLE stuff (x string, y string, z srting);") local chars = { "\"", "0", ",", "\t", "\n", "\\" } local function literal () local out = {"'"} for i = 1, math.random(1, 40) do table.insert(out, chars[math.random(#chars)]) end table.insert(out, "'") return table.concat(out) end for i = 1, tonumber(arg[1]) do print(string.format("INSERT INTO stuff(x, y, z) VALUES (%s, %s, %s);", literal(), literal(), literal())) end print(".mode csv") print("SELECT * from stuff;")