annotate bin/quotes @ 12268:6bbbe2a95120 draft

<b_jonas> slashlearn euclid//Euclid is a short geeky game in which the goal is to do Euclidean compass and straightedge constructions in as few steps as possible. It runs in the browser, found at "http://www.euclidthegame.com/". It was popular among #esoteric regulars in 2016-07.
author HackEso <hackeso@esolangs.org>
date Mon, 16 Dec 2019 23:02:52 +0000
parents ad85e082af96
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
e037173e0012 Initial import.
HackBot
parents:
diff changeset
1 #!/bin/sh
e037173e0012 Initial import.
HackBot
parents:
diff changeset
2 allquotes | if [ "$1" ]; then
e037173e0012 Initial import.
HackBot
parents:
diff changeset
3 if expr "$1" + 0 >/dev/null 2>&1; then
e037173e0012 Initial import.
HackBot
parents:
diff changeset
4 sed "$1q;d"
e037173e0012 Initial import.
HackBot
parents:
diff changeset
5 else
e037173e0012 Initial import.
HackBot
parents:
diff changeset
6 grep -P -i -- "$1"
e037173e0012 Initial import.
HackBot
parents:
diff changeset
7 fi
10027
ad85e082af96 <oerjan> ` cp bin/quote{,s} # add rng improv
HackBot
parents: 0
diff changeset
8 else shuf --random-source=/dev/urandom -n 1; fi