diff bin/quotes @ 9075:c989a1669243

<fizzie> revert 58b9ee8f97a7
author HackBot
date Sun, 25 Sep 2016 20:31:46 +0000
parents e037173e0012
children ad85e082af96
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bin/quotes	Sun Sep 25 20:31:46 2016 +0000
@@ -0,0 +1,8 @@
+#!/bin/sh
+allquotes | if [ "$1" ]; then
+    if expr "$1" + 0 >/dev/null 2>&1; then
+        sed "$1q;d"
+    else
+        grep -P -i -- "$1"
+    fi
+else shuf -n 1; fi