Re:Show HN: A fix for the .bash_profile .bashrc .profile mad...
by moe on Saturday August 11, 2012 @08:40AM
(#4369985)
Which man-page exactly?
The fun part about .bashrc, .bash_profile, .profile, /etc/bash*, /etc/profile etc. is that their semantics vary wildly between linux-distros. Not even Ubuntu and Debian agree here.
You never quite know where, when and if .bashrc is sourced by the distro-templates. A .bash_profile that unconditionally sources .bashrc will work fine on one distro, on the next you will see it run multiple times, on yet another you run into an infinite recursion.
His approach is the correct one and you'll find a similar script in just about any sizable, heterogenous deployment.
The fun part about .bashrc, .bash_profile, .profile, /etc/bash*, /etc/profile etc. is that their semantics vary wildly between linux-distros. Not even Ubuntu and Debian agree here.
You never quite know where, when and if .bashrc is sourced by the distro-templates. A .bash_profile that unconditionally sources .bashrc will work fine on one distro, on the next you will see it run multiple times, on yet another you run into an infinite recursion.
His approach is the correct one and you'll find a similar script in just about any sizable, heterogenous deployment.