[Gllug] ADVERT: Shell Scripting book
Steve Parker
steve at steve-parker.org
Tue Jul 19 20:35:44 UTC 2011
On 19/07/11 11:11, Alain Williams wrote:
> On Sat, Jul 16, 2011 at 12:52:40AM +0100, Steve Parker wrote:
>
>> On 16/07/11 00:44, JLMS wrote:
>>
>>> Are you selling the PDF or it was just wishful thinking?
>>> --
>>>
>>>
>> The 70-page PDF of the tutorial is for sale at £4.99 at
>> http://steve-parker.org/sh/buy/ - the book is looking like something
>> around 540 pages for £20-£30
>>
> Sorry I feel that I am being thick: what is the difference between the book and the tutorial ?
>
> Me as someone who has been writing things like shell scripts for almost 40 years but
> wants to learn new tricks.
>
>
Not at all, I haven't gone over it. The tutorial [1] is pretty much
totally restricted to Bourne shell compatibility (there's the occasional
acknowledgement of other shells with more features, but everything in
the tutorial is Bourne compatible). It's also aimed at a reasonably low
level - starting with why you need +rx permissions to run a script, and
then covers the basic features - variables, if/then/else, loops, case,
and so on. The PDF is just the same as what's freely available on the
web, just a more convenient format, and comes out as 70 sides of A4.
The book [2] is focussed on Linux and Bash, though again it acknowledges
other shells and operating systems, but some of the examples use Linux
/proc features, Bash arrays, even Bash v4 associative arrays, and so on,
because its aim is to cover what can be done with a modern *nix shell
today. Whilst the tutorial is very conservative, the book tries to cover
newer stuff - Bash v4 isn't in many distros yet, but soon will be (I'm
guessing that as RHEL6 shipped with Bash v3 that it won't upgrade during
the life of RHEL6 though).
The first 50% of the book (Part I) is tutorial style, going through all
the features much like the online tutorial, but in more depth (writing
for the web encourages brevity; you get a lot more space to dig deeper
in a book), and covers more features. A lot of the examples are still
quite abstract though, to illustrate a particular point rather than to
show a real-world shell script.
Part II is largely based around coreutils - all of the day-to-day tools,
like grep, basename, etc, and gives more real-life examples than Part I.
Part III is then what the publisher like to call "Recipes" (I'm much
more convinced now that this is a good idea than I was to start with!),
and although arguably a bit artificial, these scripts are longer, more
robust, deal with practical issues, and have subheadings of
"Technologies Used" (so you can easily see if it's going to be
relevant), "Concepts", "Potential Pitfalls", "Structure" (which
describes the script, what it does, how and why), "Recipe" (just a
listing of the code), and "Invocation" (showing the script being run).
The idea of this section is that the scripts might be useful
immediately, but ultimately that they show and discuss "real" scripts,
not just academic scripts which aren't useful in the real world.
The book comes out at around 534 pages of content (plus the contents,
index etc)
Steve.
[1] http://steve-parker.org/sh/sh.shtml
[2] http://sgpit.com/book
--
Gllug mailing list - Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug
More information about the GLLUG
mailing list