|
Search Forums:
|
|||||||
| Forums | Register | Forum Rules | Linux and Unix Links | Man Pages | Albums | FAQ | Users | 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. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi I have the process to kill regulary, but the PSID is dymatic change and not sure how to kill the specific process ID Check the tradekast_rvd is running , if such process, kill the els process id Code:
ps -e f |grep tradekast_rvd ps -ef |grep els then I kill els process id CODE Code:
Processid=2404 if ps -e f |grep tradekast_rvd then ps -ef | grep els ; kill$ else echo " No such Process end if What is another way to do the script ? Thank you Last edited by pludi; 07-30-2010 at 01:03 AM.. |
| Sponsored Links | |
|
|
|
#2
|
|||
|
|||
|
ps -ae | awk '/els/ {print $1}' | xargs kill
I'd use that line to kill els |
| Sponsored Links | ||
|
|
|
#3
|
|||
|
|||
|
Thank your reply
I check it. thanks ![]() |
| Sponsored Links | ||
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Script to start background process and then kill process | holocene | UNIX for Dummies Questions & Answers | 4 | 06-10-2010 03:39 AM |
| Script to Kill a Process by Name... | cannon1707 | Shell Programming and Scripting | 7 | 04-21-2010 06:47 PM |
| Shell Script to Kill Process(number of process) Unix/Solaris | jonnyvic | Shell Programming and Scripting | 2 | 12-03-2009 01:44 PM |
| Script to kill process... | malcomex999 | Shell Programming and Scripting | 2 | 03-02-2009 10:29 AM |
| Script to kill process | Lestat | Shell Programming and Scripting | 5 | 06-15-2005 12:09 PM |
|
|