We have a script that fetches all the active processes and kills it . But for some reason i am getting the below error :
:: INFO :: /AA/AAA/AAA/AAA/AAA/AAA/AAA/AAA\ Servers.sh :: 2016-06-26:04:00:04 : FORCE KILLING REMAINING SERVER PROCESSES
:: INFO :: /AA/AAA/AAA/AAA/AAA/AAA/AAA/AAA\ Servers.sh :: 2016-06-26:04:00:04 :force_stop_managed_servers calledkill: usage\ : kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspe\ c]
My Script has the below function to force kill the processes.
function force_stop_managed_servers () {
printf "\n\n:: INFO :: $0 :: `date +%Y-%m-%d:%H:%M:%S` :force_stop_managed_servers called"
cd $SCRIPT_DIR
kill -9 $(ps -ef | grep SONARPOTY | grep $USER | grep -v "grep" | grep -v "StopManagedServers" | grep -v "controller"| awk '{ print $2 }')
printf "\n\n:: INFO :: $0 :: `date +%Y-%m-%d:%H:%M:%S` :force_stop_managed_servers done"
}
Please let me know why am i getting this error.