I am getting an unexpected end of file error. I am not really sure how to fix it.
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# User specific aliases and functions
export PS1='\[\e[0;32m\]\u\[\e[m\] \[\e[1;34m\]\w\[\e[m\] \[\e[1;32m\]\$\[\e[m\] \[\e[1;37m\]'
export LS_COLORS='di=35;1'
alias la='ls -lah'
alias cdu='cd /home/hzhang/primary'
#module load gnu-compilers/4.7.0
#module load mvapich3/gnu/1.7
.ls /opt/intel/Compiler/11.1/072/bin/ifortvars.sh intel64
#PATH=$PATH:/home/hzhang/primary/over2.2e/bin_dp:/home/hzhang/primary/foiltest
PATH=$PATH:/opt/overflow/intel/serial/bin_dp/:/home/hzhang/primary/chimera2.1/bin_dp/:/u/primary/hzhang/pegasus/bin_dp
export PATH
ulimit -s unlimited
An Unexpected end of file error in a Bash script usually occurs when you there is a mismatched structure somewhere in the script. If you forget to close your quotes, or you forget to terminate an if statement, while loop, etc, then you will run into the error when you try to execute your Bash script.
The . bashrc file is a script file that's executed when a user logs in. The file itself contains a series of configurations for the terminal session. This includes setting up or enabling: coloring, completion, shell history, command aliases, and more. It is a hidden file and simple ls command won't show the file.
I had the same error due to missing "fi" line. Make sure to omit syntax errors. The original .bashrc is located in /etc/skel/. So just run the following command:
cp /etc/skel/.bashrc ~
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With