Description
The following collection of command files, aka shell scripts, provides some useful examples of osh and sh6 scripting.
The entire collection may be downloaded (v6scripts-20080624.tar.gz, checksums) and installed for personal or general use. The INSTALL script in the collection automatically converts all of the sh6 command files to run with osh if sh6 and glob6 are not installed on the given system. Refer to the LICENSE and README files for further information.
Osh command files
The following command files run with osh(1):
- alarm.osh - Sleepy? Use the shell and terminal as an alarm clock.
- basename.osh - Print the filename portion of a pathname.
- circalc.osh - Calculate 3 values representing the size of a circle.
- dirname.osh - Print the directory portion of a pathname.
- dman.osh - Display manual pages.
- fd0to2.osh - Copy data from standard input to standard error.
- intcmp.osh - Compare 2 integers according to the given operator.
- mksums.osh - Print a list of checksums for the given file(s).
- ncat.osh - Concatenate/print files w/ line numbers.
- oshlatest.osh - Check if the running shell is the latest release.
- pargs.osh - Print an argument list as interpreted by the shell.
- printenv.osh - Print the environment.
- strlen.osh - Print the length of a string argument.
- xtitle.osh - Set window title for terminal emulators under X.
Sh6 command files
The following command files run with sh6(1):
- counts.sh6 - Demonstrate using `shift' to control loop iteration.
- finfo.sh6 - Print information about a file or directory.
- killer.sh6 - Kill a command file if invoked w/ an unexpected name.
- perror.sh6 - Print an error message for a command file.
- pusage.sh6 - Print a usage message for a command file.
- switch.sh6 - Simulate a C-like switch with if(1) and goto(1).
- which.sh6 - Print the location of program file(s) in PATH.
- zdate.sh6 - Print the date and time for a list of time zones.


