parent
54e193a2b8
commit
f86d469973
@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
cd "`dirname $0`"
|
||||||
|
port=$(grep ^port= ../DATA/SETTINGS/yacy.conf |cut -d= -f2)
|
||||||
|
./search1.sh -s localhost:$port '"$1"'
|
@ -0,0 +1,33 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
cd "`dirname $0`"
|
||||||
|
if which curl &>/dev/null; then
|
||||||
|
while getopts "ys" opt; do
|
||||||
|
case $opt in
|
||||||
|
y)
|
||||||
|
shift;
|
||||||
|
curl -s "http://$1/yacysearch.rss?query=$2" | awk '/^<link>/{ gsub("<link>","" );gsub("<\/link>","" ); print $0 }'
|
||||||
|
;;
|
||||||
|
s)
|
||||||
|
shift;
|
||||||
|
curl -s "http://$1/solr/select?q=text_t:$2&start=0&rows=100&fl=sku&wt=rss" | awk '/^<link>/{ gsub("<link>","" );gsub("<\/link>","" ); print $0 }'
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
elif which wget &>/dev/null; then
|
||||||
|
while getopts "ys" opt; do
|
||||||
|
case $opt in
|
||||||
|
y)
|
||||||
|
shift;
|
||||||
|
wget -q -O - "http://$1/yacysearch.rss?query=$2" | awk '/^<link>/{ gsub("<link>","" );gsub("<\/link>","" ); print $0 }'
|
||||||
|
;;
|
||||||
|
s)
|
||||||
|
shift;
|
||||||
|
wget -q -O - "http://$1/solr/select?q=text_t:$2&start=0&rows=100&fl=sku&wt=rss" | awk '/^<link>/{ gsub("<link>","" );gsub("<\/link>","" ); print $0 }'
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
else
|
||||||
|
echo "Neither curl nor wget installed!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
cd "`dirname $0`"
|
||||||
|
port=$(grep ^port= ../DATA/SETTINGS/yacy.conf |cut -d= -f2)
|
||||||
|
./searchall1.sh -s localhost:$port $1
|
@ -0,0 +1,4 @@
|
|||||||
|
TMPFILE=`mktemp -t search` || exit 1
|
||||||
|
for address in `./up1.sh $1`; do sleep 0.01; ./search1.sh -s $address $2 >> $TMPFILE & done
|
||||||
|
sleep 2
|
||||||
|
cat $TMPFILE
|
@ -1,11 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
cd "`dirname $0`"
|
cd "`dirname $0`"
|
||||||
port=$(grep ^port= ../DATA/SETTINGS/yacy.conf |cut -d= -f2)
|
port=$(grep ^port= ../DATA/SETTINGS/yacy.conf |cut -d= -f2)
|
||||||
if which curl &>/dev/null; then
|
./up1.sh localhost:$port
|
||||||
curl -s "http://localhost:$port/Network.xml?page=1&ip=" | awk '/<address>/{ gsub("<address>","" );gsub("<\/address>","" ); print $0 }' | awk '{print $1}';
|
|
||||||
elif which wget &>/dev/null; then
|
|
||||||
wget -q -O - "http://localhost:$port/Network.xml?page=1&ip=" | awk '/<address>/{ gsub("<address>","" );gsub("<\/address>","" ); print $0 }' | awk '{print $1}';
|
|
||||||
else
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
cd "`dirname $0`"
|
||||||
|
if which curl &>/dev/null; then
|
||||||
|
curl -s "http://$1/Network.xml?page=1&ip=" | awk '/<address>/{ gsub("<address>","" );gsub("<\/address>","" ); print $0 }' | awk '{print $1}';
|
||||||
|
elif which wget &>/dev/null; then
|
||||||
|
wget -q -O - "http://$1/Network.xml?page=1&ip=" | awk '/<address>/{ gsub("<address>","" );gsub("<\/address>","" ); print $0 }' | awk '{print $1}';
|
||||||
|
else
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in new issue