Redhat linux.bash_概要文件:第12行:语法错误:文件意外结束
我使用redhat linux并遇到问题:。bash_配置文件:第12行:语法错误:文件意外结束 巴什尔先生 和Bash_简介Redhat linux.bash_概要文件:第12行:语法错误:文件意外结束,linux,bash,redhat,Linux,Bash,Redhat,我使用redhat linux并遇到问题:。bash_配置文件:第12行:语法错误:文件意外结束 巴什尔先生 和Bash_简介 # .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 你能告诉我怎么解决这个
# .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
你能告诉我怎么解决这个问题吗?
谢谢这些文件都有DOS行结尾吗?请参阅bash标记上的第一点。@EtanReisner感谢您的帮助。这就是问题所在吗?我使用dos2unix bash文件解决了问题:)
# .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