Linux Forums - Linux Help,Advice & support community:LinuxSolved.com
Linux in General => Linux Development & Programming => Topic started by: santosh on May 07, 2004, 11:56:08 AM
-
hi the follwing script will display all the PID's
ps -ef | grep "$1" | grep -v grep | awk '{print $1}'
but i want a script which displays only the newest PID generated.
-
and does some one know to run the same script using php
-
U can try to use program execution functions in php such as
exec(); to make it run on ur webserver.
Prototype for exec()
exec(string command [ array result[, int return value]])
For example:
exec("ls -la");