#! /bin/sh
a=$(cat /home/cap-list.txt |wc -l)
c=`date`
echo $a
for((i=1;i<=a;i++))
do
b=$( head -$i /home/cap-list.txt |tail -1)
echo $b >> /home/checktime.txt
echo "start time:" >> /home/checktime.txt
echo `date` >> /home/checktime.txt
tahoe deep-check --add-lease --repair --dir-cap=$b >> /home/checktime.txt
echo "end time:" >> /home/checktime.txt
echo `date` >> /home/checktime.txt
done
d=`date`
echo $c >> /home/checktime.txt
echo $d >> /home/checktime.txt