Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Sep 2008 00:54:46 -0700
From:      "Richard Yang" <kusanagiyang@gmail.com>
To:        "sahil@tandon.net" <sahil@tandon.net>
Cc:        questions@freebsd.org
Subject:   Re: problem killing a process with its pid
Message-ID:  <abd417bf0809140054w1885ab07p5d3867c6426cf6f@mail.gmail.com>
In-Reply-To: <abd417bf0809140045g57eb425dk5aaf11a31e61ca7a@mail.gmail.com>
References:  <abd417bf0809132333g13670fey7e0cfc016157c029@mail.gmail.com> <20080914072936.GS234@shepherd> <abd417bf0809140045g57eb425dk5aaf11a31e61ca7a@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Another question,

why my $SHELL return csh, but only bash scripts work?
i am really really confused...

thanks
rich


2008/9/14 Richard Yang <kusanagiyang@gmail.com>

> please see below
>
> 2008/9/14 Sahil Tandon <sahil@tandon.net>
>
>> Richard Yang <kusanagiyang@gmail.com> 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?
>>
> it is working. i am setting up natd rules, so i want to make sure updated
> rules apply :)
>
>
>>  > 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 process is still up)
>>
>> In bash, you could:
>>
>> # kill -9 $(cat /var/run/natd.pid)
>
> for some reason, i need
> kill -9 $(cat /var/run/natd.pid|cut -d" " -f1)
> in a script and run the script to work...
>
> what is the equivalent, if i want to invoke it in command line under csh?
> thanks a lot
>
>
>
>
>>
>> --
>> Sahil Tandon <sahil@tandon.net>
>>
>
>
>
> --
>
> Best Regards
>
> Richard Yang
> richardyang@richardyang.net
> kusanagiyang@gmail.com
>



-- 

Best Regards

Richard Yang
richardyang@richardyang.net
kusanagiyang@gmail.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?abd417bf0809140054w1885ab07p5d3867c6426cf6f>