从另一个脚本运行bash脚本,而无需等待脚本完成执行? [英] Run bash script from another script without waiting for script to finish executing?

查看:76
本文介绍了从另一个脚本运行bash脚本,而无需等待脚本完成执行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有什么方法可以执行两个bash脚本而不会阻塞第一个?以下内容不起作用:

Is there any way to execute two bash scripts without the first one blocking? The following does not work:

exec ./script1.sh #this blocks!
exec ./script2.sh

推荐答案

在行尾放置&.

./script1.sh & #this doesn't blocks!
./script2.sh

这篇关于从另一个脚本运行bash脚本,而无需等待脚本完成执行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆