summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authortv <tv@also>2011-07-22 11:48:08 +0200
committertv <tv@also>2011-07-22 11:48:08 +0200
commitf64f32c30471366e3687107e46e2a66523227fab (patch)
tree8141ed8a2a81fab223858efb154da34333e56476 /util
parentd6e1d8c85c2cd2d1942bb1af7a57dd7a083677a7 (diff)
util google.suggest: initial import
Diffstat (limited to 'util')
-rwxr-xr-xutil/bin/google.suggest8
1 files changed, 8 insertions, 0 deletions
diff --git a/util/bin/google.suggest b/util/bin/google.suggest
new file mode 100755
index 00000000..9bde17dc
--- /dev/null
+++ b/util/bin/google.suggest
@@ -0,0 +1,8 @@
+#! /bin/sh
+
+uri="http://google.com/complete/search?output=json&q=$*"
+
+curl -sS "$uri" | sed -n '
+ s:^window.google.ac.h(\|)$::gp
+'
+echo