#!/bin/ksh
i=32
j=20080628
cd /TFT/1IL/JPG/IMAGE
while [ $i -gt 28 ] && [ $j -lt 20080631 ];
do
find ./ -mtime +$i -print |cut -c3-100 > /tmp/mnt/tmp.bk
while read filename
do
mv $filename /BKFILE/1IL/JPG/IMAGE/$j
echo $filename >> /tmp/mnt/tmpmv.txt
done < /tmp/mnt/tmp.bk
i=$(($i - 1))
j=$(($j + 1))
done
for不能做到两个变量循环,while可以做到,如上所述
阅读(3587) | 评论(0) | 转发(0) |