Mercurial > repo
view bin/random-card @ 9012:730c6b75ce1c
<oerjan> learn tanstaaha so please stop using them twh
author | HackBot |
---|---|
date | Tue, 06 Sep 2016 06:31:24 +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"