Hello everyone,
On Linux platform, if I want to get current process (for example, a shell script), are there any ways (for example, a command) to get the process ID without programming.
regards,
George
Hello everyone,
On Linux platform, if I want to get current process (for example, a shell script), are there any ways (for example, a command) to get the process ID without programming.
regards,
George
Yes.
Command is
"ps -ef"
You can get help on ps(process status) command thru manual page of "ps"
by "man ps".
S_ccess is waiting for u. Go Ahead, put u there.
Why did you post this in the C Programming forum then?get the process ID without programming.
If you understand what you're doing, you're not learning anything.
Too stupid, couldn't find the linux forum, or a search engine. Must be an Ubuntu user.
Quzah.
Hope is the first step on the road to disappointment.
Hi quzah,
What means "Ubuntu"?Originally Posted by quzah
regards,
George
Yeah... he's either an Ubuntu user or a wiseass.Originally Posted by George2
Sent from my iPadŽ
Hi itsme86,
Because I want to find a non-programming way, I think programming forum guys should know non-programming way to do the same thing. :-)Originally Posted by itsme86
regards,
George
Hi SlyMaelstrom,
What means a wiseass?Originally Posted by SlyMaelstrom
regards,
George
Thank you Ken,
Originally Posted by Ken Fitlike
regards,
George
Hi maven,
I have tried that "ps -ef" will list all the process, but I only want to get the current process ID of a shell script.Originally Posted by maven
regards,
George
That is the most warped logic I've heard in awhile.Because I want to find a non-programming way, I think programming forum guys should know non-programming way to do the same thing.
If you understand what you're doing, you're not learning anything.
This is ridiculous.Originally Posted by George2
Did you even try google? I know close to nothing about Linux. But just found the answer. I won't share it though. Do yourself (really, yourself) a big favor and try to answer your own question before wasting everybody else's time.
Originally Posted by brewbuck:
Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.
The command would be
ps ax | grep "<script name>" | awk {'print $1'}