How to list all background pids in bash
Either I am not able to phrase my search correctly or the answer is not
easy to find!, but I am trying to figure out how to list all of my
background task PIDs. For example:
So far I have found that to list the last PID we use:
$!
But now I want to list the PID of the task before that (if one exists),
but I can't find how to do that. Utlimatly I want to list all my
background task PIDs.
I know we can also find last job ID with:
%% (last job in list)
%1 (first job in list)
%2 (second job in list)
But the same does not seem to work for process id?
Thanks all :)
No comments:
Post a Comment