Script to kill the specific process

Hi

I have the process to kill regulary, but the PSID is dymatic change and not sure how to kill the specific process ID

Check the tradekast_rvd is running , if such process, kill the els process id

ps -e f |grep tradekast_rvd 
 
ps -ef |grep els  

then I kill els process id

CODE

Processid=2404
if   ps -e f |grep tradekast_rvd   
then 
ps -ef | grep els ; kill$
else
echo " No such Process
 
end if 

What is another way to do the script ?

Thank you

ps -ae | awk '/els/ {print $1}' | xargs kill

I'd use that line to kill els

Thank your reply

I check it. thanks:)