异步 shell 命令 [英] Asynchronous shell commands
本文介绍了异步 shell 命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试使用 shell 脚本来启动命令.我不在乎它是否/何时/如何/为什么完成.我希望进程启动并运行,但我希望能够立即返回到我的 shell...
I'm trying to use a shell script to start a command. I don't care if/when/how/why it finishes. I want the process to start and run, but I want to be able to get back to my shell immediately...
推荐答案
你可以只在后台运行脚本:
You can just run the script in the background:
$ myscript &
请注意,这与将 &
放在脚本中不同,后者可能不会执行您想要的操作.
Note that this is different from putting the &
inside your script, which probably won't do what you want.
这篇关于异步 shell 命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文