我正在尝试通过 PC 上的 ssh 登录在我的大学集群中安装软件。因此,我首先通过 ssh 登录,然后根据软件文档在我的 中添加以下行bash_profile
:
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
export PRIMAL="/projects/imputation_fam/primal"
export APPS="/projects/imputation_fam/apps"
source /projects/imputation_fam/primal/system/dots/bash_profile
但是当我在上述编辑后尝试运行时~/.bash_profile
,出现以下错误:
--bash: /homes/user/.bashrc: line 10: unexpected EOF while looking for matching `"'
--bash: /homes/user/.bashrc: line 12: syntax error: unexpected end of file
任何帮助将不胜感激。
编辑:.bashrc 文件
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# User specific aliases and functions
umask u=rwx,g=rwx,o=
"
答案1
删除您的.bashrc
.
它应该如下所示:
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# User specific aliases and functions
umask u=rwx,g=rwx,o=