bashrc configuration question: syntax error: unexpected end of file

Noah admin2 at enabled.com
Tue Dec 9 16:19:25 PST 2008


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





More information about the freebsd-questions mailing list