You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
541 B
13 lines
541 B
#!/bin/bash
|
|
cd "`dirname $0`"
|
|
port=$(grep ^port= ../DATA/SETTINGS/yacy.conf |cut -d= -f2)
|
|
if which curl &>/dev/null; then
|
|
curl -s "http://localhost:$port/yacysearch.rss?resource=local&verify=ifexist&query=$1" | awk '/^<link>/{ gsub("<link>","" );gsub("<\/link>","" ); print $0 }'
|
|
elif which wget &>/dev/null; then
|
|
wget -q -O - "http://localhost:$port/yacysearch.rss?resource=local&verify=ifexist&query=$1" | awk '/^<link>/{ gsub("<link>","" );gsub("<\/link>","" ); print $0 }'
|
|
else
|
|
echo "Neither curl nor wget installed!"
|
|
exit 1
|
|
fi
|
|
|