Ubuntu – error when loading .profile

profile

This is my bashrc

# LD_LIBRARY_PATH
OTCL_LIB=/home/shabeer/ns-allinone-2.35/otcl-1.14
NS2_LIB=/home/shabeer/ns-allinone-2.35/lib
X11_LIB=/usr/X11R6/lib
USR_LOCAL_LIB=/usr/local/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB:$X11_LIB:$USR_LOCAL_LIB

# TCL_LIBRARY
TCL_LIB=/home/shabeer/ns-allinone-2.35/tcl8.5.10/library
USR_LIB=/usr/lib
export TCL_LIBRARY=$TCL_LIB:$USR_LIB

# PATH
XGRAPH=/home/shabeer/ns-allinone-2.35/bin:/home/shabeer/ns-allinone-
2.35/tcl8.5.10/:/home/shabeer/ns-allinone-2.35/tk8.5.10/

#the above two lines beginning from xgraph and ending with unix should come on the same line

#NS=/home/shabeer/ns-allinone-2.35/ns-2.35/
#NAM=/home/shabeer/ns-allinone-2.35/nam-1.15/
#PATH=$PATH:$XGRAPH:$NS:$NAM

XGRAPH=/home/shabeer/ns-allinone-2.35/bin:/home/shabeer/ns-allinone-2.35/tcl8.5.10/:/home/shabeer/ns-allinone-2.35/tk8.5.10/
NS=/home/shabeer/ns-allinone-2.35/ns-2.35/
NAM=/home/shabeer/ns-allinone-2.35/nam-1.15/
export PATH=$PATH:$XGRAPH:$NS:$NAM

when I am logging for the first time every time my ubuntu 14.04 give me an error message""Error found whe loading /home/shabeer/.profile error in bashrc line 15,
saying fix it as soon as feasible….
how do i fix this problem.

This is my profile.

# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.

# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
#umask 022

# if running bash
if [ -n "$BASH_VERSION" ]; then
    # include .bashrc if it exists
    if [ -f "$HOME/.bashrc" ]; then
    . "$HOME/.bashrc"
    fi
fi

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
    PATH="$HOME/bin:$PATH"
fi

Best Answer

Your .bashrc has the following in it:

# PATH
XGRAPH=/home/shabeer/ns-allinone-2.35/bin:/home/shabeer/ns-allinone-
2.35/tcl8.5.10/:/home/shabeer/ns-allinone-2.35/tk8.5.10/

but there is what is supposed to be 1 lines split over two. Try:

# PATH
XGRAPH=/home/shabeer/ns-allinone-2.35/bin:/home/shabeer/ns-allinone-2.35/tcl8.5.10/:/home/shabeer/ns-allinone-2.35/tk8.5.10/
Related Question