echo$RESPONSE | sed's/.*<!-- cmd --><p>\(The test has been removed\.\)<\/p><!-- cmd -->.*/\1/'
fi
else
echo'There were connection problems contacting the FlockLab server '$SERVER_URL
exit 1
fi
;;
g)
echo"Fetching results for test $OPTARG ..."
OUTFILE=$DEST/$OPTARG.tar.gz
RESPONSE=`curl -o - $CURL_PARAMS-X POST -H"Content-Type: application/x-www-form-urlencoded"-d"testid=${OPTARG}&query=get&username=${USER}&password=${PASSWORD}"$SERVER_URL/login.php-o$OUTFILE$SERVER_URL/result_download_archive.php`
FILESIZE=`stat--printf="%s"$OUTFILE`
RESPONSE=`curl $CURL_PARAMS-X POST -H"Content-Type: application/x-www-form-urlencoded"-d"testid=${OPTARG}&query=get&username=${USER}&password=${PASSWORD}"-o$OUTFILE$SERVER_URL/result_download_archive.php`
RESPONSE=`curl -o - $CURL_PARAMS-X POST -H"Content-Type: application/x-www-form-urlencoded"-d"testid=${OPTARG}&query=get&username=${USER}&password=${PASSWORD}"$SERVER_URL/login.php-o$OUTFILE$SERVER_URL/testconfig_download.php`
RESPONSE=`curl $CURL_PARAMS-X POST -H"Content-Type: application/x-www-form-urlencoded"-d"testid=${OPTARG}&query=get&username=${USER}&password=${PASSWORD}"-o$OUTFILE$SERVER_URL/testconfig_download.php`