![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how do I kill defunct processes? | csaunders | SUN Solaris | 10 | 01-28-2008 04:49 PM |
| kill all processes | Terrible | Shell Programming and Scripting | 0 | 08-21-2006 08:49 PM |
| Script to kill rsh processes running for more than 10 mins | amitsayshii | UNIX for Dummies Questions & Answers | 3 | 07-04-2006 01:45 PM |
| script to kill rsh processes running for more than 10 minutes | amitsayshii | Shell Programming and Scripting | 1 | 06-27-2006 11:12 AM |
| script to kill rsh processes running for more than 10 minutes | amitsayshii | UNIX for Advanced & Expert Users | 1 | 06-27-2006 11:07 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Need a script to kill processes with PPID of 1
Hi,
I have been trying to come up with a script to run as a cron job to kill any processes that have PPID of 1. I have created a file that contains the PID and the PPID. How can I read this file and then execute a kill on any PID where PPID is 1. The file looks like this: 4904 1 4455 1 6561 6560 5678 1 I create the file using: ps -ef|grep -v root|grep rp_h1|awk '{print $2 , $3}' > killog Then I want to read the killog file and issue a kill -9 on each PID that has a PPID of 1. This seems like it should be simple, but I am not very good with script writing. Thanks in advance for your help!!! Lori |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|