#!/bin/sh
. /etc/path.conf
file=$1
DEBUGFILE='/tmp/imdebug'
echo $file > ${DEBUGFILE}
if [ ! -e "$file" ]; then
echo "$file didn't exists."
exit 1
fi
echo "lalala" >> ${DEBUGFILE}
COUNT=1000
while [ $COUNT -gt 1 ]
do
echo "COUNT: $COUNT" >> ${DEBUGFILE}
sh do.sh $file >> ${DEBUGFILE}
COUNT=`expr $COUNT - 1`
done
|
原来是COUNT=`expr $COUNT - 1`写成了COUNT=`expr $COUNT-1`,减号前后要有空格,要不然就把它当成一个字符串了。
阅读(4672) | 评论(0) | 转发(0) |