Skip to content

Instantly share code, notes, and snippets.

@danielkappelle
Created September 18, 2018 15:21
Kill all processes that match grep
#!/bin/sh
# Usage
# $ ./killall.sh <youmatch>
sudo kill -9 $(ps aux | grep $1 | sed -r 's/^[a-zA-Z]+\s+([0-9]+).*$/\1/')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment