Mercurial > repo
view bin/random-card @ 8925:a342fbe67f84
<oerjan> learn Mole is a unit for measuring large numbers of burrowing teeth.
author | HackBot |
---|---|
date | Tue, 16 Aug 2016 23:15:08 +0000 |
parents | 8934300cd6d1 |
children |
line wrap: on
line source
#!/bin/sh exec perl -e'open$I,"<","share/mtg/allsets.txt"or die$!;$/=""; @c=grep{/(?mi:$ARGV[0])/}<$I>; print($c[rand(@c)] || "No card found.");' -- "$1"