switch to using sed to snip what we don't want

This commit is contained in:
kytv
2013-01-31 02:33:59 +00:00
parent 6f89577f78
commit f9e35bbe22

View File

@ -1,5 +1,6 @@
#!/bin/sh
# From http://forum.i2p/viewtopic.php?t=4367
b64=$(echo "lookup $1 \nquit\n" | nc localhost 2827|grep AAAA |cut -f2 -d' ')
temp=$(printf "lookup $1 \nquit\n" | nc localhost 2827) 2>/dev/null
b64=$(echo $temp | sed 's/BOB\s00\.00\.10\sOK\sOK\s\([A-Za-z0-9~-]\+\)\sOK\sBye!/\1/')
echo $b64