It has been a while since I've posted one of these (which some have called a "bug report"). It doesn't mean that I didn't find any more problems as I worked my way through completing RHEL 8 - RH124 material.
On the contrary, I found quite a few more -- I just didn't post them. Some were little issues, like this prompt, which can't exist (unless someone jacked with the PS1 variable): [root@host ~]$
(Incidentally, the RHEL 7 material had/has a lot of this kind of prompt mistake in it.)
Some were more significant, but I forget them off the top of my head.
Anyway, here's what I have for today:
RHEL 8, RH134, Chapter 1, section 1 says:
Now, I don't disagree with the statement, but it is hardly complete. It leads the student into thinking that all scripts must be made executable.
Then there's this, in Section 2
So... Yeah. Two things here.
This wasn't made executable, contrary to the content in Section 1 (which never did talk about sourcing a script).
Bash scripts are being written, so why is shell being called? IMHO, this step should be changed to either bash firstscript.sh or source firstscript.sh.
As to #2 - I'm sure some will say that the scripts should be made compatible with shell (for portability) and that not everything you can do in a Bash script is compatible with shell. I'll counter with this, Bash is being taught, so teach it.
Oh... In Section 3 (I peeked ahead), don't even get me started on the topic of using single bracket ([ ]) when using an if conditional. IMHO, double brackets ([[ ]]) should be used. The content even says this:
"...available since Bash version 2.02..." The version of Bash in RHEL 8 that we're using to teach is 4.4.
Bash 2.02 was released in 1998, isn't it time we teach to the new version?
So why are single brackets being taught? Backwards compatibility, portability, etc...?
I'm teaching Bash, based on the 4.4 version. I'll let my students know that there are other methods out there and they may see them on older (other) systems, but I will not accept work that uses single brackets with if conditionals.
Program Lead at Arizona's first Red Hat Academy, est. 2005 Estrella Mountain Community College