I have a list of application process id's.
Is there a way to kill all the process listed below using the script, except the once which are starting with " Genesis "
Scripts are killing all the processes mentioned in the text file except the Genesis processes.
Scripts are written assuming you have the list of processes to be killed in a file.
The first script reads the inputfile ( containtig list of processes to be killed) line by line , if it finds third column to be Genesis then it moves to next line, otherwise it kills the process.
In the second script, grep -v is used to search all the lines which do not contain "Genesis" , cut is used to extract its pids. and then the processes are killed
Thanks alot for explaining the scripts.
The above scripts is used to exclude one Process from killing.
What if i want to exclude couple of more process say -- " murali" and "hippo" from being killed