#!/bin/sh
mypath=/home/yuanchm
check_file_exist()
{
echo "check the file write?"
if [ $test -w $mypath/1.png ]
then
echo "delete it"
rm $mypath/1.png
else
echo "not write!"
sleep 1
rm $mypath/1.png
fi
}
ftp_down()
{
echo "ftp to 192.168.1.108"
wget -P $mypath/ ftp://123:123456@192.168.1.108/1.jpg
}
sleep_60s()
{
for i in 1 6 12 18 24 30 36 42 48 54 60
do
sleep 6
echo $i
done
}
while [ 1 ]
do
check_file_exist
ftp_down
sleep_60s
done
阅读(2708) | 评论(0) | 转发(1) |