The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



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 you create a zombie process? teiji UNIX for Dummies Questions & Answers 6 02-16-2009 09:08 PM
Re: How do I recognize a zombie process? pikecoguy UNIX for Dummies Questions & Answers 4 08-23-2008 05:29 AM
zombie process jeenat Linux 5 03-28-2008 07:36 AM
Zombie process swhitney UNIX for Advanced & Expert Users 2 10-22-2004 06:12 PM
Zombie process orca UNIX for Dummies Questions & Answers 8 04-26-2002 03:54 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 03-11-2009
ruben.rodrigues ruben.rodrigues is offline
Registered User
  
 

Join Date: Jan 2009
Posts: 45
Zombie process

Hi

I need help because I don't know if it is possible to add a find inside a cat.

like I have a file with the pid of the process that use to became zombie. And I have the same pid stored in the var (pid1)

Quote:
cat /home/ruben/Desktop/zombie.txt | while read x; do
if [ find $pid1 ]
then
kill $pid2
fi
done
now, I have no clue how to check if the the find finds the pid or even if it's possible

Any help please

Last edited by ruben.rodrigues; 03-11-2009 at 09:48 AM..
  #2 (permalink)  
Old 03-11-2009
danmero danmero is offline Forum Advisor  
  
 

Join Date: Nov 2007
Location: 45.48-73.63
Posts: 1,441
Quote:
Originally Posted by ruben.rodrigues View Post
I have a file with the pid of the process that use to became zombie. And I have the same pid stored in the var (pid1)
This should work:

Code:
while read pid
do
   pgrep $pid && pkill $pid
done < /home/ruben/Desktop/zombie.txt

  #3 (permalink)  
Old 03-11-2009
ruben.rodrigues ruben.rodrigues is offline
Registered User
  
 

Join Date: Jan 2009
Posts: 45
well thanks for trying but I found another solution and now I don't have zombies.

But I still have a problem and I fell like I'm very close to finish this bloddy script

Quote:
until [ ! `cat svn.txt` -eq "svn `whoami`" ] ; do

...................

done
What is wrong in this until cicle? Is it something clearly wrong??
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 05:38 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0