Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

Fixed broken searchall shell scripts

luccioman1b3cb3820efc
diff --git a/bin/searchall.sh b/bin/searchall.sh
index 64a59561e..78eca6b4f 100755
--- a/bin/searchall.sh
+++ b/bin/searchall.sh
@@ -1,7 +1,10 @@
#!/usr/bin/env sh
+# Perform a search on the Solr index of each active principal and senior peers known by the local peer
+# $1 search term
+
cd "`dirname $0`"
. ./checkDataFolder.sh
. ./checkConfFile.sh
port=$(grep ^port= "$YACY_DATA_PATH/SETTINGS/yacy.conf" |cut -d= -f2)
-./searchall1.sh -s localhost:$port $1
\ No newline at end of file
+./searchall1.sh "localhost:$port" "$1"
\ No newline at end of file
diff --git a/bin/searchall1.sh b/bin/searchall1.sh
index 3f94d7c6b..7669138e7 100755
--- a/bin/searchall1.sh
+++ b/bin/searchall1.sh
@@ -1,4 +1,13 @@
-TMPFILE=`mktemp -t search` || exit 1
-for address in `./up.sh $1`; do sleep 0.01; ./search1.sh -s $address $2 >> $TMPFILE & done
+#!/usr/bin/env sh
+# Perform a search on the Solr index of each active principal and senior peers known by the given peer
+# $1 a peer address as host:port
+# $2 search term
+
+TMPFILE=`mktemp -t searchXXX` || exit 1
+for address in `./up.sh $1`;
+do
+ sleep 0.01
+ ./search1.sh -s `printf "$address" | tr -d '\r\n'` "$2" >> "$TMPFILE" &
+done
sleep 2
cat $TMPFILE