-bash: .bash_profile: command not found

时间:2024-11-16 15:04:31

今天有一同事安装了ORACLE后,在切换账号时遇到错误提示“-bash: .bash_profile: command not found”。如下所示

[root@GLETestLinux ~]# su - oracle

-bash: .bash_profile: command not found

[oracle@GLETestLinux ~]$ more .bash_profile

.bash_profile

 

# Get the aliases and functions

 

if [ -f ~/.bashrc ]; then

        . ~/.bashrc

fi

-bash: .bash_profile: command not found

我仔细检查了好几遍,最后才发现原因:该同事直接从安装文档拷贝内容粘贴到配置文件.bash_profile时,误带入了.bash_profile到配置文件.bash_profile里面(截图箭头所示),结果就出现了上面错误,粗心害人不浅啊!