kill processes by regex


/ Published in: Bash
Save to your folder(s)



Copy this code and paste it in your HTML
  1. #!/bin/bash
  2. ps ax | grep $1 | sed 's/\ \([0-9]*\).*/\1/g' | xargs kill -9

URL: http://www.arnebrasseur.net

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.