Linux ps,显示pid和argv参数,但不显示完整的命令名?

Linux ps,显示pid和argv参数,但不显示完整的命令名?,linux,ps,Linux,Ps,我在debian压缩下运行,需要以非常特定的格式获取进程列表。 流程以以下方式启动: /$script -- $param 在下文中,我将$script称为“test.sh”,因此它将如下所示: /test.sh -- 99 我需要找到所有这些进程的pid列表+它们的第一个argv参数(始终只有一个argv参数): $pid |$argv 我发现ps可以输出带有-o标志的用户格式的进程列表,目前我的解决方案是:ps-cscript.sh-opid,command=,它返回以下内容: 6660

我在debian压缩下运行,需要以非常特定的格式获取进程列表。 流程以以下方式启动:

/$script -- $param
在下文中,我将$script称为“test.sh”,因此它将如下所示:

/test.sh -- 99
我需要找到所有这些进程的pid列表+它们的第一个argv参数(始终只有一个argv参数):

$pid |$argv

我发现ps可以输出带有-o标志的用户格式的进程列表,目前我的解决方案是:
ps-cscript.sh-opid,command=
,它返回以下内容:

6660 /bin/sh /var/www/test.sh -- 15
7012 /bin/sh /var/www/test.sh -- 18
7041 /bin/sh /var/www/test.sh -- 19
7541 /bin/sh /var/www/test.sh -- 16
7741 /bin/sh /var/www/test.shq -- 1
是否有可能以如下方式显示此输出

6660 15
7012 18
7041 19
7541 16
7741 1

要切割的管道应具备以下功能:

ps -C script.sh -o pid,command= | cut -d' ' -f 1,5