check running process in linux and kill code example
Example 1: Check for process and kill if running Linux
if pgrep process_name 2>/dev/null; then
echo "Terminating process_name"
pkill process_name
fi
Example 2: linux kill process
kill -9 3827
kill -9 3919
kill -9 10764
kill -9 11679