我遇到這個問題很久了,一直沒找到答案,後來看了一篇英文的才知道,希望對遇到同樣問題的有所幫助,下面是原文問答
引用地址:http://forums13.itrc.hp.com/service/forums/questionanswer.do?admit=109447627+1288685719373+28353475&threadId=1026246
Tonatiuh
|
May 10, 2006 11:40:08 GMT
|
|
Red Hat Enterprise Linux 4.
I receive an error message when I switch to oracle user:
[root@monitor etc]# su - oracle
-bash: [/bin/bash: No such file or directory
This error message is present only when I add the following lines to the /etc/profile
if [ $USER = "oracle" ]; then
if [$SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
The "/bin/bash" file does exist.
If I delete the lines showed (from the /etc/profile the error messages does not appear anymore.
This lines was extracted from the oracle manual and never have had this problem.
Any idea?
|
|
Note: If you are the author of this question and wish to assign
points to any of the answers, please login first.For more information on
assigning points ,click
here
|
|
Sort Answers By:
Date
or Points
|
|
Ivan Ferreira
|
May 10, 2006 11:53:09 GMT
10 pts
|
|
Is that a exact copy paste of the profile? Ensure that you have a space between the [ ] and the test, that is:
if<space>[<space>$USER="oracle"<space>];<space>then
if<sapace>[<space>$SHELL="/bin/ksh"<space>];<space>then |
|
|
Tonatiuh
|
May 10, 2006 11:57:05 GMT
N/A: Question Author
|
|
It is a "copy and paste" of the part I have added. |
|
Tonatiuh
|
May 10, 2006 12:08:28 GMT
N/A: Question Author
|
|
Problem solved. I omitted an space before the "$SHELL" variable.
THANK YOU!
|
|