Description

The osh project provides two ports of the original /bin/sh from Sixth Edition (V6) UNIX (circa 1975).

Osh(1) is an enhanced, backward-compatible port of the Sixth Edition Thompson shell. Sh6(1) is an unenhanced port of the shell, and glob6(1) is a port of its global command. Together, sh6 and glob6 provide a user interface which is backward compatible with that provided by the Sixth Edition Thompson shell and global command, but without the obvious enhancements found in osh.

The original Thompson shell was principally written by Ken Thompson of Bell Labs.

Additionally, this project includes the following shell utilities:

The looptest utility is packaged separately. It provides a simple way to script count-controlled shell loops.

Download

Sources contains the latest official release (see below) and several older, unsupported releases.

Please contact me if you have any comments or questions about this software. Bug reports are certainly welcome, but please try upgrading to the latest official release before reporting any bug as it may have already been fixed. New releases of the osh project are announced on freshmeat.net and softpedia.com.

Osh is also included as shells/osh in FreeBSD Ports, as shells/osh in MacPorts, and as shells/osh in NetBSD pkgsrc.

Fun

Here is a little quiz about Ancient Research UNIX (only V1 through V7). Test your knowledge of UNIX history and the shell by taking the quiz if you like.

Notes

The Thompson shell's command language is a predecessor and subset of that found in the Bourne shell and C shell. The Thompson shell's external utilities complement the basic functionality of its command language. Since the Thompson shell initially set the stage for basic UNIX-shell functionality, all modern UNIX shells still have a great deal in common with it.

The Thompson shell supports command pipelines (constructed with | or ^), both sequential commands (;) and asynchronous commands (&), I/O redirection (<, >, >>), globbing (*, ?, [...]), and parameter substitution ($1, $2, $3) among other things.

The NOTES file contains further information about these ports of the shell. In addition, here are some example command files (aka shell scripts) which may help to illustrate some of their capabilities. Last but not least, here are some example rc files which may help the user wishing to use osh interactively to better understand how to configure the environment.

Why

You may wonder why a person would want to use a port of an ancient UNIX shell like osh or sh6 instead of a modern UNIX shell. Consider this question. Is it possible to use the shell to do more work with less compiled C source code? Yes, it is quite possible. This challenge and the associated benefits of seeing possibilities instead of limitations drives me to use these shells.

Essentially, the idea of "possibilities" in this case boils down to the simple fact that you can do quite a lot with even the most basic shell on a UNIX system. It is important to remember that a UNIX system is a set of tools (aka utilities). These shells, all shells in fact, are tools which are part of the UNIX toolbox. Knowing how to use these tools together is the key to getting your work done.

The usefulness of these shells in a given context is a function of the utilities the user chooses to complement the basic shell functionality. For example, the system utilities which are often useful in such a context include awk(1), expr(1), grep(1), sed(1), and a whole slew of others. In fact, proper use of the proper utilities in a pipeline can eliminate a host of imagined limitations which may be placed on these shells. Also, remember that temporary files are helpful when needed.

All of this can prove to be challenging, educational, and fun. It can also facilitate "remembering our history" which is something that is always important in my estimation. Consider trying osh and sh6 for yourself to see that doing more with less is both possible and beneficial.