异步shell命令 [英] Asynchronous shell commands
问题描述
老实说,我无法相信我能不能找到这个网上的解决方案。我对面,似乎类似的一些东西运行,但没有真正我想要做什么......
I honestly can't believe I can't find a solution for this online. I've run across a few things that seem similar, but nothing that really does what I want...
我试图用一个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...
这就是希望再清楚不过,我可能只是失去了一些东西令人难以置信的愚蠢
Hope thats clear enough, I'm probably just missing something incredibly stupid
推荐答案
您只需运行该脚本在后台:
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屋!