You can easily pipe the output of the ps command to get the line and PID you need. The last started process will most likely be on line four (including header) at any time. Unless, that is, you immediately start the c-shell rather than entering it from bash, in that case it would be on line three.
Use
% pidof command
, or% ps
.Example usage:
You can easily pipe the output of the
ps
command to get the line and PID you need. The last started process will most likely be on line four (including header) at any time. Unless, that is, you immediately start the c-shell rather than entering it from bash, in that case it would be on line three.Example: