The UNIX and Linux Forums
>
Top Forums
>
UNIX for Dummies Questions & Answers
Need to get pid of a process and have to store the pid in a variable
User Name
Remember Me?
Password
Google UNIX.COM
Forums
Directory
Register
Forum Rules
FAQ
Contribute
Members List
Search
Today's Posts
Mark Forums Read
Thread
:
Need to get pid of a process and have to store the pid in a variable
View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
#
2
(
permalink
)
06-11-2007
lorcan
Registered User
Join Date: May 2007
Posts: 217
This is to find the pid for the single process
Code:
ps -ef | grep 'your procees' | grep -v grep | awk '{print $2}' | read pid
lorcan
View Public Profile
Find all posts by lorcan