Skip to content

Instantly share code, notes, and snippets.

@romanbonapart
Created April 13, 2017 07:58
Show Gist options
  • Save romanbonapart/bbe5443b857348a51deba49f2791de82 to your computer and use it in GitHub Desktop.
Save romanbonapart/bbe5443b857348a51deba49f2791de82 to your computer and use it in GitHub Desktop.
Kill process contain defined string
#!/bin/bash
for pid in $(ps -ef | awk '/some search/ {print $2}'); do kill -9 $pid; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment