Jon Drews wrote: >On 9/25/05, Robert Citek <[EMAIL PROTECTED]> wrote: > > > >I think (not sure) that is have it figured out. The initial login >reads ~/.profile but subsequent sub shells only read ~/.bashrc >(.kshrc, or .cshrc ...). The ~/.profile contains the path and >environment variables. The login shell is the the only one to set >these. This initial login is referred to as the login shell? Do I >understand that correctly? > > > >
Jon, You have hit this on the nail, I think. Additionally, this affects the 'su' command. If you switch user, it changes your userid, but leaves your env (incl PATH) settings as is. But if you really want to take on the full identity of the other user, 'su -c' will invoke the login shell for that user (as if you loged out/log back in or 'login user', thereby recreating that users' full env after login. This could have been a holdover from less powerful machine days as well. It takes some time and memory to process the full .profile and other shell scripts. Each shell command in a pipeline or large shell script execs a new /bin/sh process for each of these. Not having to read a large amount of ENV and alias and func settings every time would make the whole process faster. Ed -- Ed Howland WDT Solutions, LLC. [EMAIL PROTECTED] (314) 962-0766 _______________________________________________ CWE-LUG mailing list [email protected] http://www.cwelug.org/ http://www.cwelug.org/archives/ http://www.cwelug.org/mailinglist/
