Mercurial > repo
view bin/rng @ 9237:768c2b69f6e4
<oerjan> ` mv bin/orenbow{,.raw}; mkx \'bin/orenbow//print_args_or_input "$@" | orenbow\'
author | HackBot |
---|---|
date | Tue, 11 Oct 2016 22:35:44 +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