kill process in a single command
I want to kill a running process from a single command line.
Is it possible.
For example :
I am running tomcat
i want to stop the tomcat
But because of some reason the tomcat doesn't stop
so every time when i stop the tomcat i need to grep the tomcat process to check if tomcat is running or not.
And if it is running then need to take the process id and then kill the tomcat process.
I want do the above activity in a single command line.