Mercurial > repo
annotate bin/random-card @ 12113:5c08df66b69d draft
<fizzie> sled /hackenv/bin/bookofeso//s|esobible|$HACKENV/esobible|g
author | HackEso <hackeso@esolangs.org> |
---|---|
date | Sat, 16 Nov 2019 22:45:57 +0000 |
parents | 9a693e54efb1 |
children |
rev | line source |
---|---|
9075 | 1 #!/bin/sh |
12019
9a693e54efb1
<b_jonas> `` /bin/sed -i \'s%"share%($ENV{HACKENV}//"/hackenv")."/share%\' bin/random-card
HackEso <hackeso@esolangs.org>
parents:
12018
diff
changeset
|
2 exec perl -e'open$I,"<",($ENV{HACKENV}//"/hackenv")."/share/mtg/allsets.txt"or die$!;$/=""; @c=grep{/(?mi:$ARGV[0])/}<$I>; print($c[rand(@c)] || "No card found.");' -- "$1" |