ps Table of Contents Use ps only on specific processes(-o) Use ps only on specific processes(-o) howto # select fields $ ps -o pgid PGID 836 838 # customize header.comma separated $ ps -o pgid=,pid=foo foo 836 836 838 838 https://ss64.com/bash/ps.html https://ss64.com/bash/ps_keywords.html