I need one help regarding killing application in linux As manual process I can use command -- ps -ef | grep "app_name" | awk '{print $2}' It will give me jobids and then I will kill using command " kill -9 jobid". I want to have python script which can do this task. I have written code as
import os
os.system("ps -ef | grep app_name | awk '{print $2}'")
this collects jobids. But it is in "int" type. so I am not able to kill the application. Can you please here? Thank you