PHP
·
发表于 5年以前
·
阅读量:8290
for i in {1..10}
do
echo $i
done
for File in 1 2 3 4 5
do
echo $File
done
for shname in `ls *.sh`
do
name=`echo "$shname" | awk -F. '{print $1}'`
echo $name
done
for shname in `find . -type f -name "*.sh"`
do
name=`echo "$shname" | awk -F/ '{print $2}'`
echo $name
done
for((i=1;i<100;i++))
do
if((i%3==0))
then
echo $i
continue
fi
done
for i in `seq 100`
do
if((i%3==0))
then
echo $i
continue
fi
done
min=1
max=100
while [ $min -le $max ]
do
echo $min
min=`expr $min + 1`
done
i=1
while(($i<100))
do
if(($i%4==0))
then
echo $i
fi
i=$(($i+1))
done
MAX_RUN_NUM=8
cat cfg/res_card_partition.cfg |grep -v '^$'|grep -v "#" | grep -v grep |while read partition
do
nohup sh inv_res_card_process.sh $partition >log/resCard$partition.log 2>&1 &
while [ 1 -eq 1 ]
do
psNum=`ps -ef | grep "inv_res_card_process" | grep -v "grep" | wc -l`
if [ $psNum -ge $MAX_RUN_NUM ] then
sleep 5
else
break
fi
done
done