view bin/rng @ 2361:005d7c29403e

<nooodl> (echo \'#!/bin/sh\'; echo \'tr A-Z U | tr a-z u\') > bin/uuu; chmod a+x bin/uuu
author HackBot
date Sun, 03 Mar 2013 21:34:46 +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