From owner-freebsd-questions@FreeBSD.ORG Wed Dec 10 00:19:25 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C75711065670 for ; Wed, 10 Dec 2008 00:19:25 +0000 (UTC) (envelope-from admin2@enabled.com) Received: from typhoon.enabled.com (typhoon.enabled.com [216.218.220.21]) by mx1.freebsd.org (Postfix) with ESMTP id AEA138FC12 for ; Wed, 10 Dec 2008 00:19:25 +0000 (UTC) (envelope-from admin2@enabled.com) Received: from [172.23.8.177] (nat-service4.juniper.net [66.129.225.151]) (authenticated bits=0) by typhoon.enabled.com (8.14.3/8.14.3) with ESMTP id mBA0JPlt003377 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 9 Dec 2008 16:19:25 -0800 (PST) (envelope-from admin2@enabled.com) Message-ID: <493F0B08.7030007@enabled.com> Date: Tue, 09 Dec 2008 16:19:20 -0800 From: Noah User-Agent: Thunderbird 2.0.0.18 (Macintosh/20081105) MIME-Version: 1.0 To: Christopher Cowart , User Questions References: <493EE2EB.2070104@enabled.com> <20081209225135.GA3409@hal.rescomp.berkeley.edu> <20081209225838.GB3409@hal.rescomp.berkeley.edu> In-Reply-To: <20081209225838.GB3409@hal.rescomp.berkeley.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Re: bashrc configuration question: syntax error: unexpected end of file X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2008 00:19:25 -0000 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