From owner-freebsd-questions@FreeBSD.ORG Wed Dec 10 00:22:04 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 960E01065672 for ; Wed, 10 Dec 2008 00:22:04 +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 7E70F8FC14 for ; Wed, 10 Dec 2008 00:22:04 +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 mBA0M1N7003502 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 9 Dec 2008 16:22:02 -0800 (PST) (envelope-from admin2@enabled.com) Message-ID: <493F0BA5.50206@enabled.com> Date: Tue, 09 Dec 2008 16:21:57 -0800 From: Noah User-Agent: Thunderbird 2.0.0.18 (Macintosh/20081105) MIME-Version: 1.0 To: Noah , User Questions References: <493EE2EB.2070104@enabled.com> <20081209225135.GA3409@hal.rescomp.berkeley.edu> In-Reply-To: <20081209225135.GA3409@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:22:04 -0000 Hi, Christopher Cowart wrote: > Noah wrote: >> I am unable to figure out why I am getting the following error: "-bash: >> /Users/user/.bashrc: line 10: syntax error: unexpected end of file > [...] >> localhost:~ user$ cat .bashrc >> #nc_fix() { sudo kill -9 $"(ps auxwww | grep [nN]cproxyd | awk '{print >> $2}')" } >> nc_fix() { sudo kill -9 $(ps auxwww | grep "[nN]cproxyd" | awk '{print >> $2}') } > > The } is a statement, and must be preceded with a newline or a ;. > > Try: > > nc_fix() { sudo kill -9 $(ps auxwww | grep "[nN]cproxyd" | awk '{print > $2}'); } > > or > > nc_fix() { > sudo kill -9 $(ps auxwww | grep "[nN]cproxyd" | awk '{print $2}') > } > > Everything that follows right now is part of the definition of nc_fix(). > When you get to the end of the file, it says "Hey! I'm still defining a > function!" > Christopher - you are the winner. Please pick up your consolation prize at the door :) Cheers, noah