Thread: Odds and ends
View Single Post
Posts: 875 | Thanked: 918 times | Joined on Sep 2010
#51
Originally Posted by Addison View Post
How do I get the PID though?
To kill the one with the highest pid:
Code:
kill `pidof -s xkbd`
If you want to kill a specific instance you need to store the PIDs as you launch them, $! is the last backgrounded process.
Code:
xkbd & PID1=$!
xkbd & PID2=$!
kill $PID1
You can also store the PIDs in named files if the launch script is separate from the kill script.
 

The Following User Says Thank You to auouymous For This Useful Post: