语法错误:文件 .bash_profile 意外结束

Sam*_*ami 6 bash syntax

我将以下代码添加到空的 ~/.bash_profile 文件中,在重新启动并通过 ssh 登录到服务器后,我收到语法错误:文件 .bash_profile 意外结束

NODE_ENV=production
if [ -f ~/.bashrc ]; then   . ~/.bashrc fi
Run Code Online (Sandbox Code Playgroud)

Flo*_*sch 10

在 之前需要有一个分号或换行符fi

if [ -f ~/.bashrc ]; then   . ~/.bashrc; fi
Run Code Online (Sandbox Code Playgroud)