From owner-freebsd-questions@FreeBSD.ORG Tue Dec 9 22:51:36 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 5BD5D1065672 for ; Tue, 9 Dec 2008 22:51:36 +0000 (UTC) (envelope-from ccowart@rescomp.berkeley.edu) Received: from hal.rescomp.berkeley.edu (hal.Rescomp.Berkeley.EDU [169.229.70.150]) by mx1.freebsd.org (Postfix) with ESMTP id 43E9A8FC16 for ; Tue, 9 Dec 2008 22:51:36 +0000 (UTC) (envelope-from ccowart@rescomp.berkeley.edu) Received: by hal.rescomp.berkeley.edu (Postfix, from userid 1225) id 8A33A3C0463; Tue, 9 Dec 2008 14:51:35 -0800 (PST) Date: Tue, 9 Dec 2008 14:51:35 -0800 From: Christopher Cowart To: Noah Message-ID: <20081209225135.GA3409@hal.rescomp.berkeley.edu> Mail-Followup-To: Noah , User Questions References: <493EE2EB.2070104@enabled.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-ripemd160; protocol="application/pgp-signature"; boundary="PEIAKu/WMn1b1Hv9" Content-Disposition: inline In-Reply-To: <493EE2EB.2070104@enabled.com> Organization: RSSP-IT, UC Berkeley User-Agent: Mutt/1.5.16 (2007-06-09) Cc: User Questions 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: Tue, 09 Dec 2008 22:51:36 -0000 --PEIAKu/WMn1b1Hv9 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Noah wrote: > I am unable to figure out why I am getting the following error: "-bash:= =20 > /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=20 > $2}')" } > nc_fix() { sudo kill -9 $(ps auxwww | grep "[nN]cproxyd" | awk '{print=20 > $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=20 $2}'); } or nc_fix() {=20 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!" --=20 Chris Cowart Network Technical Lead Network & Infrastructure Services, RSSP-IT UC Berkeley --PEIAKu/WMn1b1Hv9 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iQIcBAEBAwAGBQJJPvZ3AAoJEIGh6j3cHUNP+wUP+gP+9WDKGSwgxEmoBuhZmkUx a3ZVfO+2aIEjY6+YZOG1mERw9CgDWm2vf+4T/CuFQpZqid2GDJBnKBjTt1oVKHU7 eowLR4nqb1HeBpv1zPw1C+K0MsB1Y4fx0hgGYDvAoof9tnh3rIklGvbdFnXAb88r MtOwd+azbZDRpwCcof51nG9RZ6eyxRUYI+IOt5fweVss0VwEc5ba3/VM9Io8ccR0 WwUpOz0R2HaD/I81ta/3JjjV7GDZ9BXH016eoj1cX8XSPhgERMTsm49fQtwvmtwF ou2qrQiMmF2eN8WTZ/j8etl700TrLoK7avjj9ZNn/Rm9dhvcHiJ5V+Cml2k+WBRx 5gQZm9MJwiWBsV4fYPmZ/YZUhwfNSmQzCI+RR1XLAfNvy26k8JyX+XlZM6mP1zby 1jOEpAppUxY5r5dtPz+r397/VWtYcdwzoOdjx6n2JfQd5HHm98ugtBn6DdchcfVY 8N9+KpQ5Va5DtXJWBBYGLKlqxgfCXvhsj1rLq8XMXP6qdOn+4XrKs/oQvuU3PjOa /1tVDELgzf2TEXlBsiTIovz6Tr3eZZp+PPVOR/pkCpKTcPQ9PKbtkAO/uGtx6Oj6 IlIgYN4SUARcR0Iv1jlgmLlkDSfEbyGTmgSIDYMUfEZbXWpFftJMkSvUYHzkFh1x x5gidlDQA4AJs/MJAb76 =wWPB -----END PGP SIGNATURE----- --PEIAKu/WMn1b1Hv9--