From 502fe343f1bb32611f231d8586b0e1a4675a84dc Mon Sep 17 00:00:00 2001 From: tpollina Date: Fri, 13 Dec 2019 12:26:35 -0800 Subject: [PATCH] Create killer.sh --- scripts/killer.sh | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 scripts/killer.sh diff --git a/scripts/killer.sh b/scripts/killer.sh new file mode 100644 index 0000000..801bbc2 --- /dev/null +++ b/scripts/killer.sh @@ -0,0 +1,6 @@ +#!/bin/bash +#Run this script using this type of command line : bash killer.sh name_of_the_python_script_to_kill.py + +scrip_name=$1 + +kill -9 `ps ax | grep "python3.7 $scrip_name" | head -1 | awk '{print $1}'`