gnunet-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-developers] Re: [bug-GNUnet] more Failure && other :)


From: Krasko Oleksandr
Subject: [GNUnet-developers] Re: [bug-GNUnet] more Failure && other :)
Date: Fri, 5 May 2006 17:18:31 +0300

hi all
a bit better script
============
#bin/sh
if [ -z "$1" ]; then
 echo Your must enter the search file
 echo Usage: $0  filename  [timeout]
 exit 2
else
   filename=$1
fi
if [ -f $filename ]; then
echo " File : $filename exists "
echo "Removing $filename [default:y] y/n ?"
rm $1
# key="y"
# read key
# if [$key = "y"]; then
#  rm $1
#  echo "$1" remove
# else
#  exit 1
#fi
else
 echo "File: $filename nonexist "
fi

if [  ! $2 ]; then
timeout=1
else timeout=$2
fi
echo  "Running gnunet-search :"
GNUNET_SEARCHE_RESULT=`gnunet-search  $filename -m 1 -t $timeout`
echo "$GNUNET_SEARCHE_RESULT" |grep -v "download"
GNUNETURI=`echo "$GNUNET_SEARCHE_RESULT" | grep "download" | cut -f4 -d' '`
echo "GNUNETURI: $GNUNETURI"
echo "Gnunet-search complet "
echo  "Running download :"
echo "$GNUNET_SEARCHE_RESULT" | grep "download"
gnunet-download -o "$filename" $GNUNETURI
echo "Download complet :)"
exit 0

============




reply via email to

[Prev in Thread] Current Thread [Next in Thread]