The file README.txt contains a brief description of the sample
(bash) shell scripts prepared for this class. Here's its contents:
File Use
----- ---------
README.txt This file. Documentation.
clean Simple shell script that removes all *~ and \#* files
from current directory
Uses: #! /bin/bash, rm
path Pretty prints $PATH components.
Uses: $IFS, for loop, echo -e
path2 [-s] Prints path components and sorts them. Uses a
file to store temporary results.
Uses: shell functions, if, [[ ]], $#, $0, $1,
sort, output redirection
path3 [-s] Like path2, but doesn't use a file; uses a shell
variable instead.
Uses: back ticks (`...`)
driver Simply invokes args.
Uses: eval
args Shows how quoting affects word splitting.
Uses: $*, $@, for i;
enscriptEm I needed this script to print the scripts above,
so I included it (as an example of a real application).
Uses: functions with parameters, pipes, enscript
You can fetch a "tar'ed" (man tar),
"gzip'ed" (man gzip) copy of all the files
here.
(tar is a way of packaging multiple files into a single file.
gzip is a compression tool. Together they have
functionality a lot like zip in Windows.)
- Fetch the
shellScripts.tar.gz file in some directory.
tar xzvf shellScripts.tar.gz to "extract"
the individual files
- You should now have copies of README.txt, clean, etc. in that directory.
Note: Your browser may offer to open WinZip, or a similar program, when you
fetch the .tar.gz file. That could work...