谁知道这是什么错误!行 14: 语法错误: 未预期的文件结尾!!!

nantongzhangbibi 2012-02-26 02:46:15
# .bash_profile

# Get the aliases and functions
if [-f ~/.bashrc ]:then
. ~/.bashrc
f i

#User specific environment and startup programs

PATH=/home/embed/microblaze-elf-tools/bin:SPATH:SHOME/bin

export PATH
unset USERNAME

source ~/.bash_profile
提示 行 14: 语法错误: 未预期的文件结尾
我的目的是添加交叉工具链所在路径到PATH中去
...全文
1777 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
justkk 2012-02-27
  • 打赏
  • 举报
回复
if [-f ~/.bashrc ]:then
把冒号改为分号

f i
改为
fi

PATH=/home/embed/microblaze-elf-tools/bin:SPATH:SHOME/bin
把里面的S改为$

ls -l /root/.bashrc
看看权限
nantongzhangbibi 2012-02-26
  • 打赏
  • 举报
回复
谢谢了 但是为什么会出现这种问题
这是什么情况 我是root登陆的啊-bash: /root/.bashrc: 权限不够
[Quote=引用 1 楼 kid_coder 的回复:]

C/C++ code

# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
~/.bashrc
fi

#User specific environment and startup programs

PATH=/home/embed/microblaze-elf-tools/bin:SPATH……
[/Quote]
KID_coder 2012-02-26
  • 打赏
  • 举报
回复

# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
~/.bashrc
fi

#User specific environment and startup programs

PATH=/home/embed/microblaze-elf-tools/bin:SPATH:SHOME/bin

export PATH
unset USERNAME

注意书写

23,125

社区成员

发帖
与我相关
我的任务
社区描述
Linux/Unix社区 应用程序开发区
社区管理员
  • 应用程序开发区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧