Softpanorama
(slightly skeptical) Open Source Software Educational Society

May the source be with you, but remember the KISS principle ;-)

Google   


Shell Papers, E-books and Tutorials

News

The main shell page

Best Shell Books

Recommended Articles O'Reilly CD Bookshelfs

Tutorials

{****} Overview Documentation for Bash Bash Reference Manual - Table of Contents -- Edition 2.2, for bash Version 2.02. 1 April 1998 Command and Shell User's Guide -- good reference from Digital . See also Digital UNIX UXP/V User's Guide -- contains good Shell Tutorial (FUJITSU LIMITED 1997) Shell Scripts and Awk on the CUED Teaching System UNIX Shell Programming

Classic Unix Tools

AWK

Softpanorama Unix Shell Dotfiles Page

Examples Shell Prompts Etc

There is no really outstanding online shell books or tutorials.  There are some average and one good. Among free tutorials you should look at one from Digital Unix. The best open book is Learning Korn Shell  (available on CD in HTML format from O'Reilly). The second edition is probably the best into/intermediate book for ksh88.

The third edition is only good (and is definitely less impressive then the second, ksh88 oriented edition) intro/intermediate coverage of  ksh93. This is now a problem with many O'Reilly books: the original authors lost interest in the subject or retired, and "hired guns" cannot produce the same quality and adequate update of the material. 

There is also a similar book devoted to bash Learning the Bash Shell also available on CD, but it is also weaker then the second edition of  Learning Korn Shell .  Generally it is highly recommended to get O'Reilly Unix bookshelf CD. The third edition contains one excellent, one good and two average books:

**** Unix Power Tools, 3rd Edition;

??? Learning the Unix Operating System, 5th Edition;

??? Learning the vi Editor, 6th Edition;

??? Mac OS X for Unix Geeks;

***** Learning the Korn Shell, 2nd Edition;

*** sed & awk, 2nd Edition;

*** Unix in a Nutshell, 3rd Edition.

If you need to learn ksh you probably will be better off buying a good into book for the OS you are using that using online material in addition to an online book mentioned above. For example for Solaris one can use A Practical Guide to Solaris, for Linux A Practical Guide to Red Hat Linux 8 (but do not buy more recent Fedora-based edition,  as it lucks the reference section).  Both are pretty cheap now on Amazon.

Learning shell involves learning a lot of Unix utilities and such a book can save you time and is a definitely better learning path than any "pure shell" offerings. 

Again learning shell means also learning classic Unix utilities and that a separate large area of study that should not be overlooked neither by the student nor teachers of the into shell courses.  See Softpanorama University Classic Unix Tools Page and Pipes -- powerful and elegant programming paradigm

Good luck with your shell classes and remember that selection of right teacher is half of the success ;-)

Dr. Nikolai Bezroukov


Notes:
  • Those pages are written by people for whom English is not a native language. Some amount of grammar and spelling errors should be expected.
  • This is a Spartan WHYFF (We Help You For Free) site. It cannot replace the best teachers and the best books.
  • The site contain some obsolete pages as it develops like a living tree... Some links on older pages are broken. Please try to use Google, Open directory, etc. to find a replacement link (see HOWTO search the WEB for details). We would appreciate if you can mail us a correct link.

Search Amazon by keywords:

Google   
Open directory

Research Index

 

Old News ;-)

Please visit  Heiner Steven SHELLdorado: the best shell scripting site on the Internet

[Apr 4, 2008] Bash Guide for Beginners by Machtelt Garrels

Table of Contents
Introduction
1. Bash and Bash scripts
2. Writing and debugging scripts
3. The Bash environment
4. Regular expressions
5. The GNU sed stream editor
6. The GNU awk programming language
7. Conditional statements
8. Writing interactive scripts
9. Repetitive tasks
10. More on variables
11. Functions
12. Catching signals
A. Shell Features
B. GNU Free Documentation License
Glossary
Index

[Aug 22, 2007] LPI exam 102 prep: Shells, scripting, programming, and compiling,"

[Feb 14, 2007] oreilly.com -- Online Catalog Learning the bash Shell, Third Edition

[Feb 14, 2007] Unix Power Tools, Third Edition

[Mar 25, 2005] Unix shell scripting with sh-ksh

Course Handout: (last update 21 March 2005)  by Richard Brittain, Dartmouth College Computing Services. Available as separate Web pages and one document. the latter can serve as a good reference.

Copyright status:
Permission is granted to download and use these notes and example scripts, as long as all copyright notices are kept intact. Some of the examples are taken from texts or online resources which have granted permission to redistribute. Contents: 

1. What is a shell script
2. Why use shell scripts
3. History
4. Feature comparison
5. Other scripting languages
6. ksh/bash vs sh
7. Basics
8. Filename Wildcards
9. Variables
10. Preset Variables
11. Arguments
12. Shell options
13. Command substitution
14. I/O redirection and pipelines
15. Input and output
16. Conditional Tests
17. Conditional Tests (contd.)
18. Flow control
19. Flow control (contd.)
20. Conditional test examples
21. Miscellaneous
22. Manipulating Variables
23. Functions
24. Advanced I/O
25. Wizard I/O
26. Coprocesses
27. Signals
28. Security
29. Style
30. Examples
31. Common external commands
32. References

Korn Shell (ksh) Programming

Rc ­ The Plan 9 Shell a very interesting paper. Must read.

Learning Red Hat Linux, 2nd Edition Chapter 13 Advanced Shell Usage and Shell Scripts

Nicely written chapter with a lot of tips useful for beginners.

Using the UNIX Platform on the Rensselaer Computing System (RCS) Memo RPI.113 Academic Computing Services, June 2001

Linux.com Learn HOWTOs - Advanced Bash-Scripting HOWTO  by Mendel Cooper --Advanced Bash-Scripting HOWTO: A guide to shell scripting, using Bash. Nice tutorial

The Solaris 2.7 Common Desktop Environment: Desktop KornShell User's Guide Answerbook is available online (the dtksh is a ksh93 with Motif extensions).

{***+} Bourne Shell Programming by Robert Sayle  Online book. Pretty good.[link updated Jan 29, 2000. ]

Bourne Shell Programming teaches UNIX users how to harness the power of the shell.  The book assumes that the reader has at least a general knowledge of UNIX including its commands, syntax, and operation.  It also assumes that the reader also understands simple programming techniques inherent to most programming languages.  The book does not provide instruction on the basics of UNIX.  It instead builds upon these basics by showing how to combine them with the shell's programming facilities.  The goal is to train users to employ these techniques at both the command line and within scripts so that the operating system becomes a tool instead of a hindrance.

This book was written over the course of a number of years mainly because the author switched career paths.  The change consequently resulted in a text tested against two different versions of UNIX.  Some examples are shown in Sun Solaris 2.4 while others are given from Linux Slackware 3.2.  Readers are cautioned to check their local operating system's manual pages on any command demonstrated for proper syntax and operation.

The author realizes he is prone to error and respectfully requests any corrections be forwarded by email.  Suggestions on improving this book are also welcome as are offers to publish it through traditional channels.

For notes on the format of this book, the reader is directed to the conventions listed in the book's foreword.

This book was derived from a class created and presented at ARINC Inc, Newport Beach, CA.

AIX Bourne shell tutorial  from UCF Computer Services AIX on-line manual. There are several mirrors for AIX docs online AIX Version 4.3 System User's Guide Operating System and Devices see also mirror About This Guide

[Jun 15, 1999] Idaho State University Basic UNIX Tutorial -- good; not only potato can grow in Idaho :-)
 

[Nov 17, 1998] Shell Quoting Guidelines V 1.2 by Tim Maher
 

[Nov 17, 1998] How to write a shell script

Old possibly broken links

Overview Documentation for Bash

This is an outdated documentation for bash 1.14 available from many places on the Internet.

Advanced Bash Scripting Guide 

The Advanced Bash Scripting Guide is both a reference and a tutorial on shell scripting. This comprehensive book (the equivalent of about 646 print pages) covers almost every aspect of shell scripting. It contains over 300 profusely commented illustrative examples, and a number of tables.

Not just a shell scripting tutorial, this book also provides an introduction to basic programming techniques, such as sorting and recursion. It is well suited for either individual study or classroom use.


UNIX Shell Programming

UNIX Bourne Shell Programming  contains a good introduction to the Bourne Shell and has a chapter about KSH Programming, too. download Zip-archive with the book (116 KB).

Contents

I. INTRODUCTION

  1. BOURNESHELL OVERVIEW
  2. USER SHELL AND READ-ONLY SHELL VARIABLES
  3. POSITIONAL PARAMETERS
  4. CONTROL CONSTRUCTS
  5. COMPILING PROGRAMS IN UNIX.
  6. UNIX TOOLS.
  7. VAX DCL TO UNIX SHELL SCRIPT CONVERSION.
  8. ADVANCED FEATURES OF FTP.
  9. OPTIONAL CHAPTER - KORNSHELL PROGRAMMING.

APPENDIXES A - sh B - test C - expr D - ftp E - cc F - f77 G - lint   H - cb I - ar J - time K - ksh


University Courses

Tutorials

 LPI exam 102 prep: Shells, scripting, programming, and compiling

Bash Guide for Beginners by Machtelt Garrels

Table of Contents
Introduction
1. Bash and Bash scripts
2. Writing and debugging scripts
3. The Bash environment
4. Regular expressions
5. The GNU sed stream editor
6. The GNU awk programming language
7. Conditional statements
8. Writing interactive scripts
9. Repetitive tasks
10. More on variables
11. Functions
12. Catching signals
A. Shell Features
B. GNU Free Documentation License
Glossary
Index

Recommended Articles and Book Chapters

Examples

Please visit  Heiner Steven SHELLdorado  the best shell scripting site on the Internet

Examples from Bash Cookbook

Examples from Learning the bash Shell, 2nd Edition

Examples from Learning the Korn Shell

Examples from Learning the Korn Shell, 2nd Edition (this is actually a weaker book then the first edition)

Examples from   Unix Power Tools, Third Edition


Copyright © 1996-2007 by Dr. Nikolai Bezroukov. www.softpanorama.org was created as a service to the UN Sustainable Development Networking Programme (SDNP) in the author free time. Submit comments This document is an industrial compilation designed and created exclusively for educational use and is placed under the copyright of the Open Content License(OPL). Original materials copyright belong to respective owners. Quotes are made for educational purposes only in compliance with the fair use doctrine.

Standard disclaimer: The statements, views and opinions presented on this web page are those of the author and are not endorsed by, nor do they necessarily reflect, the opinions of the author present and former employers, SDNP or any other organization the author may be associated with. We do not warrant the correctness of the information provided or its fitness for any purpose.

Last modified: April 04, 2008