Thanks You!

What is the difference between an interactive shell
and a subshell?

--- "T. Sean (Theo) Schulze" <[EMAIL PROTECTED]>
wrote:
> On 4/18/00 23:48, Eddis JEfferson at
> [EMAIL PROTECTED] wrote:
> 
> > 
> >In my studies of the startup files, I've
> encountered
> >the .profile and the .bashrc files.  I understand
> that
> >there is a global one of each, and then there is a
> >user one of each.
> >
> >What I don't understand is the purpose of the
> .bashrc
> >file.  My documentation says it's for alias' and
> for
> >"functions".  What is a function??  I suspect this
> is
> >getting into shell scripting...
> >
> 
> O'Reilly's "Learning the bash Shell" by Cameron
> Newham and Bill 
> Rosenblatt, says that bash uses three files,
> .bash_profile, .bashrc and 
> .bash_logout.
> 
> .bash_profile (which can also be named .bash_login)
> is executed when you 
> log in.  When you log in, bash will first look for
> .bash_profile.  If it 
> doesn't find it, it will then look for .bash_login
> and then .profile.  
> You can place commands you want to run when you
> login in this file.  For 
> example, if you wanted a calendar printed to the
> screen, or fortune run, 
> or your schedule for the day displayed when you
> first logged in, these 
> commands would go in .bash_profile.  Note that the
> Bourne shell also 
> reads its information from .profile.  According to
> the book, "a similar 
> approach was intended for .bash_login and the C
> shell .login, but due to 
> differences in the basic syntax of the shells, this
> is not a good idea."
> 
> .bashrc is executed every time you start up a new
> subshell.  If you want 
> the same commands to run in your interactive shells
> as run in your login 
> shell, you can use the source command within
> .bash_profile to run your 
> .bashrc file.
> 
> .bash_logout is read a login shell exits.  An
> example usage is to have 
> the screen clear as you log out, so that whoever
> sits down afterward at 
> that terminal doesn't see a screen full of your
> latest novel, or whatever.
> 
> >It also said that some distro's forego the .bashrc
> and
> >put everything in the respective .profile file.  So
> I
> >commented out my alias' (just one for color ls) and
> >moved them to the ~/.profile file.  Worked fine...
> 
> On my SuSE 6.3 system, the default .bashrc says at
> the top, "~/.bashrc is 
> read for interactive shells and ~/.profile is read
> for login shells.  We 
> just let ~/.profile also read ~/.bashrc and put
> everything in ~/.bashrc." 
>  
> 
> >
> >What then is the logic behind having a .bashrc
> file? 
> >And what are rc files (run control if I'm correct)
> >used for---there are rc files for x and kde and
> other
> >apps to.  Are they running configuration files? 
> >
> 
> Yes.
> 
> >And maybe it's a Caldera thing---but why is roots
> home
> >directory outside the /home tree?  Is this normal?
> >
> 
> On my SuSE system, root's home directory is /root. 
> I believe (although 
> it has been a while) that on my old NetBSD system,
> root's home directory 
> was literally the root directory, /, but I am
> probably wrong.
> 
> Cheers,
> Sean
> 
> 
> 
>                  T. Sean (Theo) Schulze
> [EMAIL PROTECTED]            [EMAIL PROTECTED]
> ****************************************************
> 
> ...determines to remain actively seized of the
> matter.
> 
> 
> 

__________________________________________________
Do You Yahoo!?
Send online invitations with Yahoo! Invites.
http://invites.yahoo.com

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.linux-learn.org/faqs

Reply via email to