A usage of dot in bash script
bash
Solution
In bash, `.` is another way to spell `source`. So this line is the same as this:
# System-wide .profile for sh(1)
if [ -x /usr/libexec/path_helper ]; then
eval `/usr/libexec/path_helper -s`
fi
if [ "${BASH-no}" != "no" ]; then
[ -r /etc/bashrc ] && source /etc/bashrc
fi
`source` interprets the file as if the content was included at the location of the `source` command. The difference with executing it is that it can set `alias` or define `function` or variables.
Problem
What does dot mean in line 8 of the following code snippet, from the source of `/etc/profile` in Mac OS X Mavericks terminal. ``` 1 # System-wide .profile for sh(1) 2 3 if [ -x /usr/libexec/path_helper ]; then 4 eval `/usr/libexec/path_helper -s` 5 fi 6 7 if [ "${BASH-no}" != "no" ]; then 8 [ -r /etc/bashrc ] && . /etc/bashrc 9 fi ```