Operating System - HP-UX
1757053 Members
2244 Online
108858 Solutions
New Discussion юеВ

Re: at -f (script) now how to kill?

 
R.O.
Esteemed Contributor

Re: at -f (script) now how to kill?

Soory, the previous script won't run. Try this.


You can write a script to kill all the commands in your script. Provided that the command name is in the 1st column of each line in your script, do:

> for i in `cat script.sh |awk '{print$1}'`
> ps -ef|grep $i |awk '{print$2}' | xargs -n 1 kill -9
> sleep 3
> done

Regards,
"When you look into an abyss, the abyss also looks into you"
Kapil Jha
Honored Contributor

Re: at -f (script) now how to kill?

what actually this script is

more /usr/script.sh

If u can share.....

BR,
Kapil+
I am in this small bowl, I wane see the real world......
debjit-India
Frequent Advisor

Re: at -f (script) now how to kill?

I got the solution.
I killed the /usr/bin/sh and the script is killed.
debjit-India
Frequent Advisor

Re: at -f (script) now how to kill?

Thanks to all for so many response closing the thread.