'Print PGID in a Bash Script
Sorry if someone already did this question (if it's so, please link me to it), but i didn't find anything while I was surfing on the internet.
I'm writing a very easy script in Bash and I want to show PID, PPID and PGID of processes.
How can I print the value of the current PGID?
I mean I know I can give a command like ps -eLf | grep *proccess_name*, but I'd like to use the value of PGID at the same way how I do with PID an PPID simply printinf $$ for the first and $PPID for the second.
Can you help me?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
