文档介绍:Advanced Bash−Scripting Guide
An in−depth exploration of the art of shell scripting
Mendel Cooper
<thegrendel@>
08 October 2006
Revision History
Revision 15 May 2006 Revised by: mc
'SPICEBERRY' release: Minor Update.
Revision 18 Jun 2006 Revised by: mc
'WINTERBERRY' release: Major Update.
Revision 08 Oct 2006 Revised by: mc
'WAXBERRY' release: Minor Update.
This tutorial assumes no previous knowledge of scripting or programming, but progresses rapidly toward an
intermediate/advanced level of instruction . . . all the while sneaking in little snippets of UNIX® wisdom and
lore. It serves as a textbook, a manual for self−study, and a reference and source of knowledge on shell
scripting techniques. The exercises and mented examples invite active reader participation, under
the premise that the only way to really learn scripting is to write scripts.
This book is suitable for classroom use as a general introduction to programming concepts.
The latest update of this document, as an archived, bzip2−ed "tarball" including both the SGML source and
rendered HTML, may be downloaded from the author's home site. A pdf version is also available. See the
change log for a revision history.
Dedication
For Anita, the source of all the magic
Advanced Bash−Scripting Guide
Table of Contents
Chapter 1. Why Shell Programming?...............................................................................................................1
Chapter 2. Starting Off With a Sha−Bang.......................................................................................................3
. Invoking the script............................................................................................................................6
. Preliminary Exercises.......................................................................................................................6
Part 2. Basics............................................................