过滤掉grep自身进程

过滤掉grep本身进程
使用ps -ef|grep test列出包含test关键字的进程时,会包含grep test本身。
可以利用-v操作过滤,即:
ps -ef|grep test|grep -v grep