Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 09 Dec 2008 16:19:20 -0800
From:      Noah <admin2@enabled.com>
To:        Christopher Cowart <ccowart@rescomp.berkeley.edu>, User Questions <freebsd-questions@freebsd.org>
Subject:   Re: bashrc configuration question: syntax error: unexpected end of file
Message-ID:  <493F0B08.7030007@enabled.com>
In-Reply-To: <20081209225838.GB3409@hal.rescomp.berkeley.edu>
References:  <493EE2EB.2070104@enabled.com> <20081209225135.GA3409@hal.rescomp.berkeley.edu> <20081209225838.GB3409@hal.rescomp.berkeley.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi there,

Christopher Cowart wrote:
> A couple more things I noticed after looking more closely at your actual
> command: 
> 
> Christopher Cowart wrote:
>> nc_fix() { 
>>     sudo kill -9 $(ps auxwww | grep "[nN]cproxyd" | awk '{print $2}')
>                      ^ this is equivalent to:
>                    $(ps auxwww | awk '/[nN]cproxyd/ {print $2}')
>> }
> 
> You might also want to check out pkill(1):
> 
> $ sudo pkill -9 '[nN]cproxyd'
> 
> And as an alias:
> 
> $ alias nc_fix="sudo pkill -9 '[nN]cproxyd'"
> 

okay cool,

arent there two ways to get nc_fix defined in the .bashrc

option 1:  like as a function:
nc_fix() { sudo kill -9 $(ps auxwww | awk '/[nN]cproxyd/ {print $2}') }

option 2: as an alias:
alias nc_fix="sudo pkill -9 '[nN]cproxyd'"

right,

Noah






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