首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >运行bash_profile时出现意外EOF错误

运行bash_profile时出现意外EOF错误
EN

Unix & Linux用户
提问于 2015-11-09 00:39:19
回答 1查看 681关注 0票数 0

我正试图通过从我的电脑上登录ssh在我的大学集群中安装一个软件。因此,我首先通过ssh登录,然后根据软件文档在我的bash_profile中添加以下行:

代码语言:javascript
运行
复制
# .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时,我会得到以下错误:

代码语言:javascript
运行
复制
--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文件

代码语言:javascript
运行
复制
  # .bashrc

  # Source global definitions
     if [ -f /etc/bashrc ]; then
         . /etc/bashrc
     fi

  # User specific aliases and functions
     umask u=rwx,g=rwx,o=
     "
EN

回答 1

Unix & Linux用户

回答已采纳

发布于 2015-11-09 04:44:57

删除.bashrc中的尾随引号。

它应该如下所示:

代码语言:javascript
运行
复制
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
     . /etc/bashrc
fi
# User specific aliases and functions
umask u=rwx,g=rwx,o=
票数 2
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/241721

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档