Re: problem killing a process with its pid

2008-09-14 Thread Richard Yang
Another question, why my $SHELL return csh, but only bash scripts work? i am really really confused... thanks rich 2008/9/14 Richard Yang <[EMAIL PROTECTED]> > please see below > > 2008/9/14 Sahil Tandon <[EMAIL PROTECTED]> > >> Richard Yang <[EMAIL PROTECTED]> wrote: >> >> > I have been tryin

Re: problem killing a process with its pid

2008-09-14 Thread Sahil Tandon
Richard Yang <[EMAIL PROTECTED]> wrote: > I have been trying to kill the process by pulling natd.pid Is the rc script, which can be used to stop natd, not working? > below are 3 typical examples among a couple dozens I tried > > kill -9 $(natd.pid) > Illegal variable name > > kill -9 '/var/run

Re: problem killing a process with its pid

2008-09-14 Thread Yury Michurin
[EMAIL PROTECTED]:~> top & [1] 72002 [EMAIL PROTECTED]:~> echo 72002 > test [1] + Suspended (tty output)top [EMAIL PROTECTED]:~> kill -9 `cat ./test` [1]Killedtop try tcsh =) On Sun, Sep 14, 2008 at 10:28 AM, Richard Yang <[EMAIL PROTECTED]>wrote: > i just fo

Re: problem killing a process with its pid

2008-09-14 Thread Richard Yang
i just found i am on csh thanks a lot anyway :) 2008/9/14 Yury Michurin <[EMAIL PROTECTED]> > Try: > kill -9 `cat /var/run/natd.pid` > > (works for me on tcsh) > > On Sun, Sep 14, 2008 at 9:33 AM, Richard Yang <[EMAIL PROTECTED]>wrote: > >> I have been trying to kill the process by pulling natd.p

Re: problem killing a process with its pid

2008-09-14 Thread Richard Yang
Thank you :) actually, kill -9 $(cat /var/run/natd.pid |cut -d" " -f1) in a script will work... (4 hours of work for this) for some reason, 'kill' doesn't think 'cat natd.pid' is a valid pid. i have to specially cut the first part out to get it straight i am using csh i tried your suggestion

problem killing a process with its pid

2008-09-13 Thread Richard Yang
I have been trying to kill the process by pulling natd.pid below are 3 typical examples among a couple dozens I tried kill -9 $(natd.pid) Illegal variable name kill -9 '/var/run/natd.pid' kill: Arguments should be jobs or process id's cat /var/run/natd.pid | kill -9 (no error returned, but natd