CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   [OpenFOAM.org] Issue with bashrc file encountering unexpected EOF (https://www.cfd-online.com/Forums/openfoam-installation/188919-issue-bashrc-file-encountering-unexpected-eof.html)

TexasTechsan June 9, 2017 11:46

Issue with bashrc file encountering unexpected EOF
 
Hello all,

I'm attempting to fresh install OpenFOAM-2.4.0 onto a fresh Ubuntu 14.04 LTS VirtualBox for a college course and have run into a problem while running bashrc.

I have followed line-by-line the guide given by Chalmers
http://www.tfd.chalmers.se/~hani/kur...rOwnLaptop.htm

and also the guide given by the OpenFOAM wiki
http://openfoamwiki.net/index.php/In...M-2.4.0/Ubuntu

Both of which have had the same result. When I reach the point of creating an alias for bashrc and then attempt to run it, I receive the following errors:
bash: /home/user/.bashrc: line 119: unexpected EOF while looking for matching '
"
bash: /home/user/.bashrc: line 120: syntax error: unexpected end of file


When I went to look at line 119 & 120 I couldn't see an issue. Here is line 118 thru 121:
$WM_PROJECT_VERSION

# Location of site-specific templates etc
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Needless to say I am thoroughly confused and unsure how to proceed. Any insight that y'all can provide would be lovely.

wyldckat June 25, 2017 13:07

Quick answer: You need to edit the file "/home/user/.bashrc" and look for the lines that you've added.

I'm guessing that you have something like this:
Code:

alias OF24x='. $HOME/OpenFOAM/OpenFOAM-2.4.x/etc/bashrc
This is missing a quote character ' at the end of the line, which is what bash is complaining about.
The example line should look like this:
Code:

alias OF24x='. $HOME/OpenFOAM/OpenFOAM-2.4.x/etc/bashrc'
notice the quote at the end of the line.

This way the quoted part starts after the equal sign and ends before the end of the line.
By the way, EOF stands for "end of file" ;).


All times are GMT -4. The time now is 08:21.