Gnarly little "one liner" in awk
and bash
. Searches for running processes and displays the PID and command line for any matches, in JSON format.
Usage:
psj [process name or keyword] [--running] [--alias]
-
--running
: Shows only running processes -
--alias
: Shows the original caller processes (By default, shows the actual process names, not the parents) -
[
process name or keyword
]: A filter string, will show only matching processes