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 here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
DNS killing me nbredthauer What's on Your Mind? 1 04-12-2008 05:21 PM
equivalent of ptree command in zsh dhams Shell Programming and Scripting 3 09-11-2007 04:07 PM
Problem with storage of PID's to variables zwiebertje11 Shell Programming and Scripting 3 11-22-2006 09:09 AM
Meaning of ps -afe ,ps -fp and ptree PradeepRed Shell Programming and Scripting 1 02-01-2006 01:19 PM
Find PID's vibhor_agarwali UNIX for Advanced & Expert Users 2 08-16-2005 02:26 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 06-20-2006
Registered User
 

Join Date: Oct 2005
Location: Mumbai,India
Posts: 58
Thumbs up killing PID's of ptree

gurus,

normally to stop a process ,i need to kill all its child & then parent process.
i do it manually as follows

bash-2.03$ ps -ef | grep bpm|grep -v grep
tibadmin 21882 21875 0 May 27 ? 0:00 /bin/sh ./bpmse_20.sh -Xms512m -Xmx512m /tibco/UpdateCustomer/dat/UpdateCustome

tibadmin 9067 9061 0 Jun 05 ? 0:00 /bin/sh ./bpmse_20.sh /tibco/Wireline/OM/dat/OMWIrelineBPM -p /tibco/Wireline/O


bash-2.03$ ptree 9061
9061 /bin/sh /tibco/Wireline/OM/scripts/startWirelineOM.sh
9067 /bin/sh ./bpmse_20.sh /tibco/Wireline/OM/dat/OMWIrelineBPM -p /tibco/Wireline/O
9075 /usr/j2se/jre/bin/../bin/sparc/native_threads/java -server -Xms1024m -Xmx1024m

bash-2.03$ kill -9 9061 9067 9075

there are two more things to be done apart from this...

what i want is to put all these tasks in a shell script
last 2 tasks i can put in a shell script...but how can i kill PID's from 'ptree' output due to their irregular display.....i need to grep these PID's & kill them...

ANY suggestions on this?



my second query is like these :

i have 100 files & each of these files contain a specific word in them...
i need to search this word in all these files ,how can i do it?


thanks & regards
abhijeet
Reply With Quote
Google The UNIX and Linux Forums
Forum Sponsor
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 11:49 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0