> On Mon, 20 Nov 2000, Stan Isaacs wrote:
>
> > A beginner simply takes the "|" to work like a ";", and their limited
> > testing seems to show that to be correct. They are likely never to get
> > processes that take enough time to show the mistake, in simple testing.
> > Perhaps you are correct, that we should give up shell scripting and go
> > directly to perl!
>
> I would say that this is perfect thing to cover in your class. This
> 'bug/feature' illustrates three things:
>
> 1) The shell does exactly what you tell it, even if it makes no sense.
>
> 2) Just because something works doesn't mean it's right.
>
> 3) It is important to know how things work, rather than just what motions
> to go through.
Yes, that's, of course, what I try to do. But in a short class (it only
meets 12 hours in 6 weeks), I mostly need to focus on more basic things,
such as what a file is, how redirection works, directory structure, etc.
If I ever get this expanded to a semester course, or even just get a couple
of hours more, I can cover "how" in much more depth (I do now, in a second
12-hour class called "unix 2"); my problem is to get them through the real
basics without confusing them too much, at this time.
> The PS1 thing is another opportunity, show how it really gets set and why.
> On RedHat, .bash_profile sources .bashrc which sources /etc/bashrc. So,
> where should one set PS1? At the end of .bashrc or .bash_profile,
> depending on how subshells should behave.
>
> The full comment in /etc/bashrc on my machine (RH6.0) is:
>
> # For some unknown reason bash refuses to inherit
> # PS1 in some circumstances that I can't figure out.B
> # Putting PS1 here ensures that it gets loaded every time.
> PS1="[\u@\h \W]\\$ "
>
> Sounds pretty clear to me.
Thanks for quoting it for me. That's exactly the question I'm asking:
What is the "unknown reason"? Has anybody figured out the circumstances?
Then maybe I could decide if it's worth while to pull the setting out of
/etc/bashrc.
-- Stan Isaacs
> $.02
>
> Bill Carlson
> --
> Systems Programmer [EMAIL PROTECTED] | Opinions are mine,
> Virtual Hospital http://www.vh.org/ | not my employer's.
> University of Iowa Hospitals and Clinics |
>
>
>
> _______________________________________________
> Redhat-list mailing list
> [EMAIL PROTECTED]
> https://listman.redhat.com/mailman/listinfo/redhat-list
>
>
_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list