Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法在第一个阻塞的情况下执行两个 bash 脚本?以下不起作用:
exec ./script1.sh #this blocks! exec ./script2.sh
放在&行尾。
&
./script1.sh & #this doesn't blocks! ./script2.sh
使用在后台运行第一个&,你应该很好。