Shell Learning materials for Shell, Shell Scripting

Interested in:
ksh (korn shell) as the interactive shell
sh for scripting

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?)
 
My sh bible is UNIX Shell Programming by Lowell Jay Arthur (2nd ed, 1978). It covers Bourne, Korn and C Shell.
 
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 ;) 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 ;)
 
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.

Same for me. Pretty much the entire functionality of sh() is covered in the not-that-big manual page. I just started writing my application, using the man page for reference and reading through examples. I often looked through stuff like /etc/rc.subr (and other rc scripts), which were obviously written by experienced sh users, and also iocage (was sh at the time but isn't now) as that functioned similar to what I was trying to do.
 
I have Sams Teach Yourself Shell Programming in 24 Hours. It covers universal shell scripting, and differences in completing code between sh, ksh, zsh and Bash.
 
Back
Top