我怎樣才能切斷ps
命令輸出到顯示一個單一的過程殼牌腳本以切割ps命令輸出
$ ps -ef | grep -i httpd | grep -v grep
root 16786 1 0 Mar03 ? 00:01:02 /usr/sbin/httpd
apache 17153 16786 0 Apr09 ? 00:00:00 /usr/sbin/httpd
apache 17154 16786 0 Apr09 ? 00:00:00 /usr/sbin/httpd
apache 17155 16786 0 Apr09 ? 00:00:00 /usr/sbin/httpd
apache 17157 16786 0 Apr09 ? 00:00:00 /usr/sbin/httpd
apache 17158 16786 0 Apr09 ? 00:00:00 /usr/sbin/httpd
apache 17161 16786 0 Apr09 ? 00:00:00 /usr/sbin/httpd
apache 17162 16786 0 Apr09 ? 00:00:00 /usr/sbin/httpd
apache 17163 16786 0 Apr09 ? 00:00:00 /usr/sbin/httpd
非常感謝您的幫助。 –
現在還有一個問題,有一些服務器運行不同的過程,我仍然需要打印一個, –
00:00:00/bin/sh /app/opt/tomcat/bin/../instance1/bin/catalina.sh開始 00:00:00 cronolog /app/opt/tomcat/instance1/logs/catalina.%Y-%m-%d.out 00:00:00/bin/sh/app/opt/tomcat/bin/../instance2/bin/catalina.sh st –