view bin/random-card @ 8897:c7b65d0fe2f2

<shachaf> ` ln -s relcome bin/\x0304w\x0308e\x0309l\x0311c\x0312o\x0313m\x0304e\x0f
author HackBot
date Thu, 04 Aug 2016 02:22:10 +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"