Hi,
I am trying to set permanently the next environmental variables: PATH, MANPATH, INTEL_LICENSE_FILE, which are required to run the ifortran compiler.
The variables can be set using the comand source with ifortvars.sh but this only set them during the use of the terminal and once I go out the variables retake the original value.
I tried to modify the file /etc/profile. When this file is open I get the next:
# /etc/profile
# System wide environment and startup programs, for login setup
# Functions and aliases go in /etc/bashrc
pathmunge () {
if ! echo $PATH | /bin/egrep -q "(^|

$1($|

" ; then
if [ "$2" = "after" ] ; then
PATH=$PATH:$1
else
PATH=$1:$PATH
fi
fi
}
# Path manipulation
if [ $EUID = 0 ]; then
pathmunge /sbin
pathmunge /usr/sbin
fi
pathmunge /usr/X11R6/bin after
pathmunge /opt/intel/fc/9.0/bin after
# No core files by default
ulimit -S -c 0 > /dev/null 2>&1
USER="`id -un`"
LOGNAME=$USER
MAIL="/var/spool/mail/$USER"
HOSTNAME=`/bin/hostname`
HISTSIZE=1000
if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ]; then
INPUTRC=/etc/inputrc
fi
export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC
for i in /etc/profile.d/*.sh ; do
if [ -r "$i" ]; then
. $i
fi
done
unset i
unset pathmunge
It seems that the function pathmunge will change the PATH variable but even adding the new path /opt/intel/fc/9.0/bin doesn't do anything when I recheck the value of the PATH.
Does anybody knows how to work with this file and with the environmental variables in general?
Thanks in advance for any suggestion....
Fabian.