On 5 Mar, 2012, at 13:09 PM, Jim Clark wrote:

> On Mar 5, 2012, at 12:49 PM, Justin C. Walker wrote:
> 
>> To clarify this, I believe that the man page says that .bash_profile is 
>> checked for a login shell, and that .bashrc is checked for a non-login, 
>> interactive shell.
>> 
>> I'm not at a 10.6 system right now to verify that, but it is the case on 
>> 10.7, and I have my "profile/rc" set up with that assumption on both 10.6 
>> and 10.7.
> 
> Thanks, Mr. Curmudgeon ;-)
> 
> That is indeed what I read in the man page, but my intuitive sense is that 
> Terminal should open a "non-login, interactive shell" — after all, I am able 
> to start entering UNIX commands interactively, and the shell does not prompt 
> for a login. But when I actually try it out, the contents of .bashrc have no 
> effect in Terminal/bash, but the contents of .bash_profile are processed. I 
> conclude that something about a deeper understanding of Mac OS X and/or UNIX 
> is eluding me.

I think your confusion is in the use of the term "login".

Terminal starts a login shell for each window/tab that it opens, so your 
intuition needs a little polishing :-}  Think of Terminal as a glorified xterm, 
in that all the windows belong to one Terminal, rather than each xterm owning 
one window.

Login shells are represented (e.g., in 'ps' listings) with a leading "-" in the 
command name; and if you check a full "ps" listing, you'll see that the 
"parent" shell in each window (i.e., for each (pseudo)tty) has such a tag, and 
typically, no others do.

HTH

Justin

--
Justin C. Walker
Curmudgeon-at-large
--
Network, n., Difference between work
charged for and work done



-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to