周哥教IT.快速Web开发
不同的配置文件之间, 有可能存在调用关系, 比如/etc/bashrc中会调用/etc/profile.d/*.sh, 所以命令在配置文件中的书写顺序, 会影响配置文件的执行效果
[root@demo-c8 ~]# vim /etc/bashrc
...
for i in /etc/profile.d/*.sh; do # /etc/bashrc中, 调用/etc/profile.d/*/sh
if [ -r "$i" ]; then
if [ "$PS1" ]; then
. "$i"
else
. "$i" >/dev/null
fi
fi
done
...

