[sf-lug] Learning Bourne Scripting

Rick Moen rick at linuxmafia.com
Thu Jun 23 10:52:32 PDT 2011


Quoting Grant Bowman (grantbow at ubuntu.com):

> Another good answer seems to be the "Advanced Bash-Scripting Guide"
> http://tldp.org/LDP/abs/html/ which despite the title doesn't start at
> the Advanced level.  That's where you will end up after reading it.
> If you are not already familiar with it, the Linux Documentation
> Project is a fantastic resource for FAQ and HOWTO documents that many
> people (including myself) have used to teach themselves a number of
> related topics.

In particular, in addition to The Advanced Bash-Scripting Guide:

BASH Programming-Introduction HOWTO:
http://www.tldp.org/HOWTO/Bash-HOWTO/Bash-Prog-Intro-HOWTO.html 

Bash Guide for Beginners:
http://www.tldp.org/LDP/Bash-Beginners-Guide/html/

The Bash Prompt HOWTO:
http://www.tldp.org/HOWTO/Bash-Prompt-HOWTO/


> The reason I write this is because this question came up again last
> night at http://noisebridge.net during our weekly Linux Discussion.
> Does anyone else have recommendations?

I'm pretty fond, too, of O'Reilly Media's book _bash Cookbook_ by Carl
Albing and others.  The title notwithstanding, it's a good tutorial for
bash and its surrounding system context.

Chet Ramey's site is very useful:
http://tiswww.case.edu/php/chet/bash/bashtop.html

Also Bill Shotts's Writing Shell Scripts
http://www.linuxcommand.org/writing_shell_scripts.php


It's also worth reading and understanding Tom Christiansen's classic 
explanation about why, despite the original Bourne shell's inadequacies, 
csh scripting was not the answer:

http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/
or Wikipedia's condensed version:
http://en.wikipedia.org/wiki/C_shell#Criticism

The need to combine csh's advantages for interactive use with the Bourne
(sh) shell's superior scripting functions is what inspired the creation
of first the Korn shell (ksh) and then bash.  (A few oddballs also like
zsh.)






More information about the sf-lug mailing list