shell 执行一个程序多次获取预期结果

来源:互联网 发布:组播编程 编辑:程序博客网 时间:2024/05/27 20:56
#!/usr/bin/env bashfor i in `seq 1000`  do   s=`./sbm`   #echo $s   search="3.14"   [[ $s =~ $search ]] && breakdone
okay,this piece of code executes a script at most 1000 time and breaks when the result contains 3.14. 

0 0
原创粉丝点击