Using gedit, syntax errror

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
doggypoop78

Using gedit, syntax errror

Post by doggypoop78 »

when i start up my computer, it gives me a message saying; "syntax error, cannot read line 27", I tried to install java, and here is the file:

Code: Select all

# /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
AVA_HOME=/usr/local/java/jre1.8.0_73
PATH=$PATH:$HOME/bin:$JAVA_HOME/bin
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 3 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

Re: Using gedit, syntax errror

Post by MrEen »

It appears when you added the last two lines, you chopped off three lines from the original. Here's the last if block from mine:

Code: Select all

if [ -d /etc/profile.d ]; then
  for i in /etc/profile.d/*.sh; do
    if [ -r $i ]; then
      . $i
    fi
  done
  unset i
fi
While I'm not sure about the last 2 lines you added, I'm suspecting the first is missing a "J" at the beginning.

Hope that helps. And welcome to the forum. :)
doggypoop78

Re: Using gedit, syntax errror

Post by doggypoop78 »

Thnx, I'll Give It A Try, See What Happens
Locked

Return to “Beginner Questions”