#!/bin/bash
test () {
echo $a
sleep 2
}
for a in $(seq 10);do
test &
((num++))
if [[ $num -eq 6 ]];then
wait
num=0
fi
done
wait
简单的SHELL多线程脚本!!
原创
©著作权归作者所有:来自51CTO博客作者书廉的原创作品,请联系作者获取转载授权,否则将追究法律责任
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章