diff options
Diffstat (limited to 'vcpe_beijing/vcpe/test.sh.bad')
-rw-r--r-- | vcpe_beijing/vcpe/test.sh.bad | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/vcpe_beijing/vcpe/test.sh.bad b/vcpe_beijing/vcpe/test.sh.bad new file mode 100644 index 0000000..99bb2ab --- /dev/null +++ b/vcpe_beijing/vcpe/test.sh.bad @@ -0,0 +1,27 @@ +#!/bin/bash + +#开始时间 +begin=$(date +%s) + +count=$1 +rsnum=$2 +cishu=$(expr $count / $rsnum) + +for ((i=0; i<$cishu;)) +do + start_num=$(expr $i \* $rsnum + 1) + end_num=$(expr $start_num + $rsnum - 1) + for j in `seq $start_num $end_num` + do + #echo $j + ./echo.sh & + sleep 15 +i done + wait + i=$(expr $i + 1) +done + +#结束时间 +end=$(date +%s) +spend=$(expr $end - $begin) +echo "花费时间为$spend秒" |