if [ -z $1 ];then
  FILE="./sitelist.txt"
else
  FILE="$1"
fi

if [ ! -f $FILE ];then
  echo "File does not exist."
  exit 1
elif [ ! -r $FILE ]; then
     echo "File cannot be read"
     exit 1
fi

BASE_DIR="~/p2p_gaurav"
EXECTBLE="${BASE_DIR}/p2pmain"

#read site-list file
exec 3<&0
exec 0<$FILE

while read line
do
   echo $line
   log_file="${BASE_DIR}/*.log"
   ssh  -i planet_rsa -fX columbia_salman@${line} "rm -f ${log_file} "  < /dev/null 
done





