view bin/random-card @ 8997:afa2eddb9004

<int-e> revert
author HackBot
date Wed, 31 Aug 2016 21:50:31 +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"