Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
使用,的以下组合grep,我得到一个我需要杀死的pid列表:lsawk
grep
ls
awk
grep -hP '^\d+$' `ls -lad /dir/*/pid | grep -P '/dir/\d+/pid' | awk '{ print $9 }'` 13234 18972 24322
我现在如何将kill -9命令添加到此命令组合以终止这些进程?
kill -9
我已经使用`字符将awk结果传递给grep命令,所以我假设我不能再次使用它来传递它,对kill吗?
`
kill