我正在使用 grep 命令获取特定的进程 ID,但有时我会得到两个进程 ID 而我的输出不正确。
ps -ef |grep AS_Cluster.js
root 2711 2624 0 07:15 pts/0 00:00:00 grep AS_Cluster.js
root 14630 14625 0 Sep13 ? 00:32:36 node xx/x/xx/x/xx/AS_Cluster.js
我只想获取节点xx/xxx/xx/AS_Cluster.js
这个进程id的pid值。任何帮助
对此
最佳答案
关于linux - grep for process id 以获得正确的值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46483817/