0

I keep getting the following error when I open my terminal. I am running Fedora 19.

bash: Source: command not found

The above error also caused my screen to go blank when I tried to login. I then renamed by .bashrc and .bash_profile files, and the system came up fine. So it seems the problem may be with one of these files, but I am unable tell what it is.

Here are my bashrc and bash_profile files:

[gmahan@localhost ~]$ cat .bashrc
# .bashrc

[ -z "$PS1" ] && return

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

# User specific aliases and functions

[gmahan@localhost ~]$ cat .bash_profile
# .bash_profile

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

# User specific environment and startup programs

Can anyone tell me what the problem might be. Thanks.

GMahan
  • 19
  • Thanks, but could you elaborate. I'm not sure how to go about fixing it. I did reinstall the bash package, but I had no luck. – GMahan Mar 13 '15 at 12:36
  • 3
    it's source not Source. – chaos Mar 13 '15 at 12:42
  • I have printed it exactly as it's displayed on the terminal. I thought about that too, It says "Source:" – GMahan Mar 13 '15 at 12:44
  • 1
    While this error is unrelated to the message indicated, you need to separate the [ command with spaces: [ -f ~/.bashrc ]. See http://unix.stackexchange.com/q/134472 . – Emil Jeřábek Mar 13 '15 at 16:42

1 Answers1

11

The error is caused by the following line:

Source global definitions

It's probably not a command, but a comment. Prepend a # to the line and the error should be gone.

# Source global definitions
choroba
  • 47,233
  • Thanks!!! Should have seen that, I was messing around with the file on vi the other day. Anyway, thanks a bunch. – GMahan Mar 13 '15 at 12:59