Linux in General > Linux Development & Programming
LINUX SCRIPT FOR GETING THE NEWSET PID
(1/1)
santosh:
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.
santosh:
and does some one know to run the same script using php
dragoncity99:
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");
Navigation
[0] Message Index
Go to full version