view bin/random-card @ 8002:c87954a531d2

<b_jonas> `` echo $\'#!/bin/sh\\nexec perl -e\\\'\'\'open$I,"<","share/mtg/allsets.txt"or die$!;$/=""; @c=grep{/(?i:$ARGV[0])/}<$I>; print $c[rand(@c)];\'\\\'\' "$1"\' > bin/random-card && chmod -v a+x bin/random-card
author HackBot
date Mon, 09 May 2016 08:32:55 +0000
parents faebf4569ba3
children a4a897101bb9
line wrap: on
line source

#!/bin/sh
exec perl -e'open$I,"<","share/mtg/allsets.txt"or die$!;$/=""; @c=grep{/(?i:$ARGV[0])/}<$I>; print $c[rand(@c)];' "$1"