如何给参数通过管道杀 [英] How to give arguments to kill via pipe

查看:94
本文介绍了如何给参数通过管道杀的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要寻找一定的过程,并杀死该进程。我写了这样的命令:

`ps的-e | grep的DMN | AWK'{打印$ 1}'|杀

所在的进程名是DMN。但它不工作。我怎么能做到这一点。


解决方案

 杀$(ps的-e | grep的DMN | awk的'{$打印1})

I need to search for a certain process and kill that process. I wrote a command like this:

`ps -e | grep dmn | awk '{print $1}' |kill

where the process name is dmn. But its not working. How could I do this

解决方案

kill $(ps -e | grep dmn | awk '{print $1}')

这篇关于如何给参数通过管道杀的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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