diff bin/realquote @ 977:797fb6694b97

<shachaf> cp bin/quote bin/realquote; echo -n $'#!/bin/sh\nsleep 1\nrealquote "$@"\n' > bin/quote
author HackBot
date Sun, 09 Dec 2012 07:23:28 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bin/realquote	Sun Dec 09 07:23:28 2012 +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