Linux通过ps -ef过滤进程获得行数


1
count=`ps -fe |grep "one.php" | grep -v "grep" | wc -l`

获取行数并赋值给count。