How to initiate a linux (shell) command from matlab but not wait for the output?
6 次查看(过去 30 天)
显示 更早的评论
I know I can use the function unix (or system), but it has to wait the script to return. The script actually will run for a long time. I prefer matlab function to return immediately after calling the shell script. Is it possible?
Thanks a lot in advance!
0 个评论
采纳的回答
Ken Atwell
2013-7-13
If you end the command line with an ampersand, system should return immediately
system('some-long-running-command &');
Of course, you won't be able to capture the output of the command.
2 个评论
esmail
2015-2-17
Hi. My problem is that I'm running multiple files with & in the background and am using system('wait') for all of them to complete. However, system('wait') is not working. I'd appreciate your response.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Startup and Shutdown 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!