annotate bin/define @ 12296:042127c1c142 draft

<fizzie> ` rm /hackenv/bin/bfi; ln -s /hackenv/lib/kps/bfi /hackenv/bin/bfi # no need for actual copies that you can forget to delete though
author HackEso <hackeso@esolangs.org>
date Sat, 04 Jan 2020 13:28:36 +0000
parents e037173e0012
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
e037173e0012 Initial import.
HackBot
parents:
diff changeset
1 #!/bin/bash
e037173e0012 Initial import.
HackBot
parents:
diff changeset
2 if [ ! "$1" ]
e037173e0012 Initial import.
HackBot
parents:
diff changeset
3 then
e037173e0012 Initial import.
HackBot
parents:
diff changeset
4 echo 'Define what?'
e037173e0012 Initial import.
HackBot
parents:
diff changeset
5 exit 1
e037173e0012 Initial import.
HackBot
parents:
diff changeset
6 fi
e037173e0012 Initial import.
HackBot
parents:
diff changeset
7
e037173e0012 Initial import.
HackBot
parents:
diff changeset
8 QUERY=`echo -n "$1" | od -t x1 -A n -w1000 | tr " " %`
e037173e0012 Initial import.
HackBot
parents:
diff changeset
9
e037173e0012 Initial import.
HackBot
parents:
diff changeset
10 lynx --cfg=/dev/null --lss=/dev/null \
e037173e0012 Initial import.
HackBot
parents:
diff changeset
11 --dump --width=1000 'http://google.com/search?q=define:'"$QUERY" |
e037173e0012 Initial import.
HackBot
parents:
diff changeset
12 grep -A 3 'Definitions of' |
e037173e0012 Initial import.
HackBot
parents:
diff changeset
13 head -n 4 | tail -n 3