UNIX shell scripting with ksh/bash
The goals of this class are to enable you to:
These notes are intended for use in a 2-part class, total duration 3 hours.
- Learn what kinds of problems are suited to shell scripts
- Review the most commonly used Unix commands that are useful in shell scripts.
- Write simple shell scripts using the Bourne, Korn or Bash shells
It is assumed that you already know how to:
Example commands are shown
- log in and get a command line window (any shell)
- run basic commands, navigate directories
- use simple I/O redirection and pipes
- use a text editor (any one)
- look up details of command usage in man pages
like this. Many commands
are shown with links to their full man pages
Output from commands is shown like this;
optional items are [ in brackets ].
Some descriptions in these notes have more detail available,
and are denoted like this:
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.