From 1b3cb3820efc7f1f2ab008ddd80e84fc4ef84091 Mon Sep 17 00:00:00 2001 From: luccioman Date: Mon, 10 Dec 2018 17:51:15 +0100 Subject: [PATCH] Fixed broken searchall shell scripts --- bin/searchall.sh | 5 ++++- bin/searchall1.sh | 13 +++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) 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