Example Bourne shell scripts
I've written a bunch of short Bourne shell scripts to illustrate how
they work.
- showstuff, which simply combines a few commands into a script
- whon, which automates a pipe
- swap, which illustrates access to command-line arguments
- thrice, more about command-line arguments
- greet, an example of the case statement
- indir, which moves to a specified directory, then executes a specified command
- p3, an answer to an exam question from a previous year; illustrates conditionals
- p3_alternate: another way of handling
optional command-line arguments
- p4, an answer to another exam question
- p4_alternate: an even slicker way of
writing a self-reproducing shell script
- xprod: an example of back-quoting and
for-loops
Last modified:
Tue Oct 21 15:02:30 EDT 2008
Stephen Bloch / sbloch@adelphi.edu