今天有一同事安裝了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_profile時,誤帶入了.bash_profile到配置文件.bash_profile里面(截圖箭頭所示),結果就出現了上面錯誤,粗心害人不淺啊!