.bashrc syntax error: unexpected end of file

前端 未结 8 721

I am getting an unexpected end of file error. I am not really sure how to fix it.

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


        
8条回答
  •  Happy的楠姐
    2021-01-05 15:24

    . . . if ! shopt -oq posix; then if [ -f /usr/share/bash-completion/bash_completion ]; then . /usr/share/bash-completion/bash_completion elif [ -f /etc/bash_completion ]; then . /etc/bash_completion fi Fi In the first line of my terminal i got There is error at the end of the /.bashrc file but when i change Fi to fi it works fine like

    . . . . if ! shopt -oq posix; then if [ -f /usr/share/bash-completion/bash_completion ]; then . /usr/share/bash-completion/bash_completion elif [ -f /etc/bash_completion ]; then . /etc/bash_completion fi fi

提交回复
热议问题