I am fairly new to Ubuntu, and did a little more messing around than I should have. I was reading a guide on downloading the Oracle 8 JDK and it said to change the last few lines of the /etc/profile file. It popped up with an error after I did this and now I can't figure out how to change it back.
bash: /etc/profile: line 25: syntax error near unexpected token
fi' bash: /etc/profile: line 25:fi'
That is the error that pops up. This is what the /etc/profile file looks like:
# /etc/profile: system-wide .profile file for the Bourne shell (sh(1)) # and Bourne compatible shells (bash(1), ksh(1), ash(1), ...). if [ "$PS1" ]; then if [ "$BASH" ] && [ "$BASH" != "/bin/sh" ]; then # The file bash.bashrc already sets the default PS1. # PS1='\h:\w\$ ' if [ -f /etc/bash.bashrc ]; then . /etc/bash.bashrc fi else if [ "`id -u`" -eq 0 ]; then PS1='# ' else PS1='$ ' fi fi fi if [ -d /etc/profile.d ]; then for i in /etc/profile.d/*.sh; do if [ -r $i ]; then . $i fi fi JAVA_HOME=/usr/lib/jvm/java-8-oracle PATH=$PATH:$HOME/BIN:$JAVA_HOME/bin export JAVA_HOME export PATH
I don't know how to read this or how to fix it and I was stupid for trying to edit it in the first place, without knowing what I'm doing, but any advice on how to fix it would be appreciated. Thank you!