view bin/rng @ 9207:b170f93f013f

<oerjan> le/rn mornington crescent/Sorry, you cannot read this wisdom until you\'ve legally played Westminster.
author HackBot
date Sun, 09 Oct 2016 22:44:10 +0000
parents c096bb536bb2
children
line wrap: on
line source

#!/usr/bin/env lua

math.randomseed(os.time())
W={}
for i,a in ipairs(arg) do
   for w in a:gmatch("[^%s]+") do
      table.insert(W, w)
   end
end
if #W>0 then
   print(W[math.random(#W)])
end