等待所有进程具有特定名称来完成(在bash) [英] Wait for all processes with a certain name to finish (in bash)
问题描述
我想在linux下等
(Ubuntu的11.10)的过程来完成的负载。每个这些方法具有不同的PID,但相同的名称。是否有可能做到这一点?
编辑:
也许我应该指定一个我并不知道什么是PID,只是过程的名称。
编辑:
感谢您的答案;凯文似乎做我想做的。但是,它不会在具体的应用我有工作,所以我已经张贴了更详细的后续问题,<一个href=\"http://stackoverflow.com/questions/8040417/parrallel-processing-in-shell-scripting-pid-is-not-a-child-of-this-shell\">here.
等待$(指派,PROGRAMNAME)
应该做的。
I would like to wait
in linux (Ubuntu 11.10) for a load of processes to finish. Each of these processes has a different pid but the same name. Is it possible to do this?
EDIT:
Perhaps I should specify that I don't necessarily know what the pid are, just the process name.
EDIT:
Thanks for the answers; Kevin's seems to do what I want. However, it doesn't work in the specific application I have, so I've posted a more detailed follow-up question here.
wait $(pgrep programName)
Ought to do it.
这篇关于等待所有进程具有特定名称来完成(在bash)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!