nohup或screen
#!/bin/bash for i in {1..10} do {#后台运行 ip=192.169.1.$i ping -c1 -W1 $ip &> /dev/null echo $? }&#后台运行
done wait echo '完成'