What are some good books or websites I should use for 1) learning how to use the korn shell, 2) shell scripting in sh (there seems to be plethora of books on bash, but are there any good books specifically on sh?)
Well, welcome to the club
![Wink ;) ;)](https://cdn.jsdelivr.net/joypixels/assets/8.0/png/unicode/64/1f609.png)
I've been using this combination for years now (I also have
csh to be used for
root) and it never failed me so far. Of course the main reason I did this is because of my Solaris heritage (before I solely used FreeBSD I was a vivid Solaris admin).
Anyway, there are two versions available;
shells/pdksh and
shells/ksh93. I started taking a liking to the first for no particular reason, even though the latter seems to be better supported; at least it's websites such as
kornshell.com still exist.
If you're already somewhat familiar with programming / scripting and you know the underlying process then their respective manualpages also contain a good source of information. So: you're familiar with
if .. then constructions, checking (and using) of variables, you're aware of
/dev/stdin and
/dev/stdout, you know what functions or methods or procedures are and why they're used.
So if you then check
sh
for example (see
sh(1) then you get a full overview of what the shell can do. How to start it, how it handles parameters, quotation use, aliases, commands...
The best way to learn all that, in my opinion of course, is to just start using it and then refer to the manualpages if you need extra information.
Anyway, that's my opinion on it.
I can somewhat recommend Wikibooks. They have a full section on
bourne shell scripting, and since
/bin/sh is effectively a Bourne shell that would be a good place to start I think. Even free of charge
![Wink ;) ;)](https://cdn.jsdelivr.net/joypixels/assets/8.0/png/unicode/64/1f609.png)