[英]Bash profile syntax error: unexpected end of file
获取-bash: ~/.profile: syntax error: unexpected end of file
启动 tmux 时-bash: ~/.profile: syntax error: unexpected end of file
但在启动终端时没有。 尝试运行 dos2unix,但无法解决问题。 请帮忙
这是我的 ~/.profile 文件。
# if running bash
if [ -n "$BASH_VERSION" ]; then
# include .bashrc if it exists
if [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
fi
fi
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH";
fi
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/.local/bin" ] ; then
PATH="$HOME/.local/bin:$PATH";
fi
我注意到在你的 .bashrc 中有“别名 fi”,if-fi 是关键字,可能会造成麻烦......尝试在 .bashrc 中对其进行注释。 只是一个提示。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.