bashrc configuration question: syntax error: unexpected end of file

Christopher Cowart ccowart at rescomp.berkeley.edu
Tue Dec 9 14:51:36 PST 2008


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!"

-- 
Chris Cowart
Network Technical Lead
Network & Infrastructure Services, RSSP-IT
UC Berkeley
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20081209/5f5b33c2/attachment.pgp


More information about the freebsd-questions mailing list