0

In my .bashrc file are these lines

if [ -f ~/.bash_aliases ]; then
    . ~/.bash_aliases
fi

I know that . <file> syntax is very popular...what is it doing exactly? How might this be different than running

source ~/.bash_aliases
Alexander Mills
  • 9,330
  • 19
  • 95
  • 180

1 Answers1

0

In bash, . and source are equivalent. In other shells, though, they might be different. For example, traditional sh only supports ., not source.

choroba
  • 45,735
  • 7
  • 84
  • 110