Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers



View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
    #4  
Old 03-21-2002
witt
Guest
 
Posts: n/a
Bits: 0 [Banking]
No problem !
You can change the script... look this :

Code:
#!/bin/sh
while true
do
  echo "Enter parent process id  [type quit for exit]"
  read ppid

  if [ $ppid -eq "quit" -o $ppid -eq "QUIT" ];then
     exit 0
  fi

  for i in `ps -ef| awk '$3 == '$ppid' { print $2 }'`
     do
       echo killing $i
       kill $i
     done
done

added code tags for readability --oombera

Last edited by oombera; 02-18-2004 at 03:42 PM..