annotate bin/quotes @ 5983:e9e46956a506

<oerjan> mk wisdom/welcome.sv//Hej och v\xc3\xa4lkommen till den internationella knutpunkten f\xc3\xb6r esoterisk programmeringsspr\xc3\xa5ksdesign och -drifts\xc3\xa4ttning! F\xc3\xb6r mer information, se v\xc3\xa5r wiki: <http://esolangs.org/>. (F\xc3\xb6r den andra sortens esoterism, pr\xc3\xb6va #esoteric p\xc3\xa5 EFnet eller DALnet.)
author HackBot
date Mon, 14 Sep 2015 17:49:06 +0000
parents e037173e0012
children ad85e082af96
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
e037173e0012 Initial import.
HackBot
parents:
diff changeset
8 else shuf -n 1; fi