error at "su - oracle"
446155Dec 12 2005 — edited Dec 13 2005Hi,
i have oracle 10.2.0 database in linux redhat enterprise version 4.
from root in a terminal when i typr in
"su - oracle" ot get into my oracle user
i get error as follows
"-bash: [/bin/bash: No such file or directory"
it looks like there is an error in my "/etc/profile" file
and even when i execute commands like "dbshut" or "dbstart"
i get an error like
"/etc/profile: line 41: [/bin/bash: No such file or directory"
and then the command executes
how can i fix this error which looks like some setting in my /etc/profile file. THE FOLLOWING IS THE CONTENTS OF THE FILE which got created by default and i have no idea what is this pathmunge in the file
----------------------------------------------------------------------------------------------------------------
# /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 [ `id -u` = 0 ]; then
pathmunge /sbin
pathmunge /usr/sbin
pathmunge /usr/local/sbin
fi
pathmunge /usr/X11R6/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
if [ $USER = "oracle" ]; then
if [$SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
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
----------------------------------------------------------------------------------------------------------------------
Can someone help me.
Thanks,
Philip.