News for hackers. Stuff that matters.
Re:Benefits of using tmux – streamlining your development en... by partycoder on Tuesday November 08, 2016 @05:32PM (#12904555)
grrr....

    pkill thing

    killall thing
And then there's also pgrep instead of ps | grep
Re:Benefits of using tmux – streamlining your development en... by amyjess on Tuesday November 08, 2016 @05:42PM (#12904617)
killall and pkill don't work if the thing I'm trying to grep for isn't the first word of the process string.

Let's say I'm trying to kill 'python foobar.py' but I don't want to kill 'python bazquux.py'. The only thing it'll respond to with killall is 'killall python', but then both of them will respond. So I have to grep out the parameter and then kill that, with: ps -ef | grep 'foobar.py' | awk '{print "kill -9 " $2}' | sh

Re:Benefits of using tmux – streamlining your development en... by skovorodkin on Tuesday November 08, 2016 @06:01PM (#12904723)
Check out -f parameter of pkill.
Re:Benefits of using tmux – streamlining your development en... by amyjess on Tuesday November 08, 2016 @06:21PM (#12904871)
Ooh... nice! Thanks!