Results 1 to 4 of 4

Thread: Terminal error bashrc syntax error unexpected end of file

  1. #1
    Join Date
    Oct 2007
    Beans
    167
    Distro
    Ubuntu 14.04 Trusty Tahr

    Terminal error bashrc syntax error unexpected end of file

    bash: /home/v/.bashrc: line 129: syntax error: unexpected end of file

    This shows at the top of my terminal every time I open it. Things usually work fine in terminal, but I'm wondering what is going on with this message at the top. Interestly, there is no line 129 as .bashrc ends at line 128, although I'm not sure that should be unexpected. I haven't made any deliberate changes to it. Any ideas why I get this message at the top of my terminal or how to make it go away?

  2. #2
    Join Date
    Apr 2012
    Beans
    6,123

    Re: Terminal error bashrc syntax error unexpected end of file

    Maybe there's a missing newline or some control characters that you're not seeing? try

    Code:
    cat -An ~/.bashrc | tail -3
    to see the last few lines with control characters / line endings

  3. #3
    Join Date
    Aug 2011
    Location
    52° N 6° E
    Beans
    2,869
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: Terminal error bashrc syntax error unexpected end of file

    bash tries to read line 129, sees that there is no line 129 and then gives an error message. My guess is a missing quote somewhere in your .bashrc file.

  4. #4
    Join Date
    Oct 2007
    Beans
    167
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Terminal error bashrc syntax error unexpected end of file

    Sorry guys, I was out of commission for a while... but my issue was eventually solved with the fix found here:
    http://askubuntu.com/questions/52139...g-the-terminal

    Code:
    cp /etc/skel/.bashrc ~
    Just in case anyone with a weird message at the top of their terminal emulator comes across this thread while searching.
    Keep in mind I don't have a lot going on in my .bashrc file anyway. Be sure to make a backup just in case.
    Thanks.

    ps - This also got rid of a later error:

    "Unknown ruby interpreter version (do not know how to handle): textmate. Could not load ruby textmate."
    Last edited by Luxx; January 6th, 2015 at 07:53 AM.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •