CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Installation

[Other] Bash error when opening the terminal

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Search this Thread Display Modes
Old   November 1, 2017, 06:58
Default Bash error when opening the terminal
Jingxue Wang
Join Date: Sep 2017
Posts: 51
Rep Power: 5
Jingxue Wang is on a distinguished road
My original openfoam version is 3.0.1, whose files are located on in opt/openfoam30. Now I want to install another vesion-OpenFOAM-v1706. And I have put the files at ~HOME/OPENFOAM/OpenFOAM-v1706. I want to set these two aliases in .bashrc as follows:

alias of30='source /opt/openfoam30/etc/bashrc'
alias of1706='source ~/OPENFOAM/OpenFOAM-v1706/OpenFOAM-v1706/etc/bashrc'

But it can not switch over succsessfully.

So I corrected .bashrc to the original one: source /opt/openfoam30/etc/bashrc

But the following mistake always happen when opening the terminal:
bash: /home/olmati/.bashrc: line 122: syntax error: unepected end of file

I checked my .bashrc file. It only had 121 rows. NO line 122.

Could somebody has this experience? Many thanks
Jingxue Wang is offline   Reply With Quote

Old   December 31, 2017, 12:05
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,958
Blog Entries: 45
Rep Power: 122
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick answer: I don't know if you've solved the problem, but I suspect that this line:
alias of1706='source ~/OPENFOAM/OpenFOAM-v1706/OpenFOAM-v1706/etc/bashrc'
was meant to be instead:
alias of1706='source ~/OPENFOAM/OpenFOAM-v1706/etc/bashrc'

As for the latest error, my guess is that there was a lost quote ' somewhere on those last lines that you edited and that was why Bash was complaining that something was wrong after the last line of the file... since the quote mark ' did not have a corresponding pair to close it.
wyldckat is offline   Reply With Quote


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
[snappyHexMesh] Error snappyhexmesh - Multiple outside loops avinashjagdale OpenFOAM Meshing & Mesh Conversion 53 March 8, 2019 10:42
[] Error in sourcing OpenFOAM 5.x WhiteW OpenFOAM Installation 14 April 18, 2018 22:00
[] Issues with installing v1712 on MacOS Spacegirl1923 OpenFOAM Installation 8 April 12, 2018 18:44
[] Installation of OpenFOAM 1.7.1 on Ubuntu 16.04 MM_Khan OpenFOAM Installation 11 September 3, 2017 10:22
[PyFoam] doesn't plot residuals immortality OpenFOAM Community Contributions 4 June 28, 2015 11:13

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