Results 1 to 3 of 3

Thread: Terminal error bashrc syntax error unexpected end of file

  1. #1
    Join Date
    Oct 2007
    Beans
    156
    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
    5,128

    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,189
    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.

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
  •