Mercurial > repo
diff bin/rng @ 5643:56dcce63901b
<tswett> revert
author | HackBot |
---|---|
date | Sun, 21 Jun 2015 02:47:59 +0000 |
parents | c096bb536bb2 |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bin/rng Sun Jun 21 02:47:59 2015 +0000 @@ -0,0 +1,12 @@ +#!/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