view bin/random-card @ 11968:7e71c87ce110 draft

<wib_jonas> slashlearn people who taneb is not//Taneb is not elliott, a rabbi, Mark Zuckerberg, James Bond, Queen Elizabeth the first, or anyone older than Queen Elizabeth the Second. Pending approval: Shigeru Miyamoto.
author HackEso <hackeso@esolangs.org>
date Mon, 14 Oct 2019 11:31:46 +0000
parents c989a1669243
children 743d67ea7f22
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"