#!/bin/bash

# get & eventually kill all esorex-processes
echo ""
pids=$(pgrep -l esorex)
echo $pids
#read -p "Kill all these processes? (Y/n)" input
#input=${input:-y}
#if [[ "$input" != "y" && "$input" != "Y" ]]; then
   pids=$(pgrep esorex)
   for i in $pids; do
      kill -9 $i
   done
#fi

# get & eventually kill all easy-processes
echo ""
pids=$(pgrep -l easy*)
echo $pids
#read -p "Kill all these processes? (Y/n)" input
#input=${input:-y}
#if [[ "$input" != "y" && "$input" != "Y" ]]; then
   pids=$(pgrep easy*)
   for i in $pids; do
      kill -9 $i
   done
#fi

# get & eventually kill all sleep-processes
echo ""
pids=$(pgrep -l sleep)
echo $pids
#read -p "Kill all these processes? (Y/n)" input
#input=${input:-y}
#if [[ "$input" != "y" && "$input" != "Y" ]]; then
   pids=$(pgrep sleep)
   for i in $pids; do
      kill -9 $i
   done
#fi
