annotate bin/quotes @ 7297:c16fcce4ed5c

<oerjan> le/rn zerg/We\'ll try to think of an entry here, but we don\'t want to rush it.
author HackBot
date Tue, 29 Mar 2016 00:29:04 +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