[x] Welcome to LinuxSolved.com Linux help forums, here we are a community of Linux users helping each other. It is helpful to both ie. new linux users as well experienced one. We always have our experts to help you and ofcourse members help each other, so you can ask for help any time by Registering.: Click to Register

Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Linux Forums - Linux Help,Advice & support community:LinuxSolved.com  |  Forum  |  Linux in General  |  Linux Development & Programming  |  Topic: LINUX SCRIPT FOR GETING THE NEWSET PID
The LinuxSolved.com GNU/Linux User Communit - Forum
Welcome to LinuxCommunity You have just arrived to a friendly linux community which is helping Linux Users from Years.. You can be its part if you have not already joined it. Registration is FREE and is gateway to unlimited help and support to all your linux related needs. If you are an GNU/Linux supporter then you have come to the right place.
Pages: [1]
  Print  
Author Topic: LINUX SCRIPT FOR GETING THE NEWSET PID  (Read 1084 times)
0 Members and 1 Guest are viewing this topic.
santosh
New Member

Offline Offline

Posts: 2


View Profile
« on: May 07, 2004, 07: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.
Logged
santosh
New Member

Offline Offline

Posts: 2


View Profile
« Reply #1 on: May 07, 2004, 11:41:07 PM »

and does some one know to run the same script using php
Logged
dragoncity99
LST CareTaker
Experienced
*****
Offline Offline

Posts: 494


View Profile
« Reply #2 on: May 08, 2004, 01:31:06 PM »

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");
Logged
Linux Forums - Linux Help,Advice & support community:LinuxSolved.com
   

 Logged
Pages: [1]
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
shell script Linux Development & Programming puneetloiya 3 1442 Last post May 10, 2004, 11:59:35 AM
by dragoncity99
php script not working Miscellaneous sekhar_vrc 1 833 Last post October 12, 2004, 04:16:31 AM
by Ricky
Shell Script Miscellaneous gauravbajaj 6 863 Last post May 08, 2006, 05:34:32 AM
by gauravbajaj
Backup Script Linux Servers Support zubair 4 560 Last post April 13, 2006, 09:02:27 AM
by gauravbajaj
Hii. Help me in modifying my script Linux Development & Programming rammu_sivraj 1 763 Last post July 04, 2006, 02:07:29 AM
by dragoncity99
Welcome, Guest. Please login or register.
Did you miss your activation email?
November 22, 2008, 11:08:37 AM

Login with username, password and session length
Navigation
Recent Discussions
[November 20, 2008, 11:30:52 PM]

[November 19, 2008, 07:52:41 PM]

[November 19, 2008, 07:52:36 PM]

[November 17, 2008, 10:42:59 AM]

[November 16, 2008, 12:49:47 AM]

[November 16, 2008, 12:48:58 AM]

[November 15, 2008, 08:29:02 AM]

[November 15, 2008, 08:24:41 AM]

[November 14, 2008, 05:11:50 AM]

[November 13, 2008, 03:28:22 AM]
Members
Total Members: 6227
Latest: karunadct
Stats
Total Posts: 8269
Total Topics: 2253
Online Today: 10
Online Ever: 111
(June 28, 2007, 06:47:29 AM)
Users Online
Users: 0
Guests: 9
Total: 9
Privacy Policy| Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks
Theme & TinyPortal v0.9.8 © Bloc