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.
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.
$.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