Full script (put it in a path included folder and change it’s permissions to executable +x):
#!/bin/bashps aux | grep $1 | grep -v grep | awk '{print $2}' | xargs kill -9
#!/bin/bashps aux | grep $1 | grep -v grep | awk '{print $2}' | xargs kill -9