Answer the question
In order to leave comments, you need to log in
`
How to get PID from ps command in linux?
Command `ps -e | grep ghc produces:
21965 ? 00:00:00 runghc
21966 ? 00:00:12 ghc
Answer the question
In order to leave comments, you need to log in
I upvoted the previous authors, of course, but awk is not needed here at all.
ps -A -o pid is sufficient.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question