2009年3月10日星期二

.bash_profile修改后报syntax error: unexpected end of file原因与修正

profile 内容
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH
unset USERNAME
PATH=$PATH:$HOME/bin:/usr/java/jdk1.5.0_15/bin:/usr/java/jdk1.5.0_15/jre/bin
export PATH
. /d01/oracle/PROD/apps/apps_st/appl/APPSPROD_ebsap.env
错误提示
login as: appl
appl@hostname's password:
Last login: Tue Mar 10 09:16:42 2009 from 10.20.25.16
: command not found
-bash: /home/appl/.bash_profile: line 17: syntax error: unexpected end of file
-bash-3.00$ : command not found

造成错误的原因:
profile的最后一行位回车。
删除回车后问题解决。

没有评论: