等待所有进程具有特定名称来完成(在bash) [英] Wait for all processes with a certain name to finish (in bash)

查看:272
本文介绍了等待所有进程具有特定名称来完成(在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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆