Miscellaneous Utilities
The following are some miscellaneous utilities developed over the years for
use on the various systems in our offices. Many of them are no longer being
used, as systems change. These have been included in case someone has a need
for one of them, or if they just want to have a look at how something might
be programmed. Source code for each of the programs is included in the
archives. If you find any of these utilities useful, or have any comments,
please
CommandTime (v1.11 - 2003-04-27)
Used to substitute time and date parameters into command line arguments.
This package includes Linux and Windows executables ("cmdtime" and
"cmdtime.exe" respectively), with full C source (to allow compiling for
other platforms). A GNU Makefile file is also included.
This program is based on the CMDTIME program copyright 1989 by Scott Dudley.
Scott's original program was a DOS application which not fully Y2k-compliant
due to problems with the compilers of the day, and not his program code.
This version is intended to correct that issue, as well as provide support
for long file names with included spaces. Note that some of the substitution
options have changed, as well as using the "at" sign to signal a substitution
parameter rather than the dollar sign as was used in Scott's original code.
This is due to problems with the Linux shells already using the dollar sign
to identify variables.
Cookie Test (v1.00 - 2003-04-05)
Cookie Test is a perl CGI script to test whether a client's browser has cookies
enabled, and redirect to a selected URL depending on the result. Released
under the GNU Public Software License.
DoOnDate (v1.00 - 1989-01-08)
This program is designed to read an input text file and execute the DOS
commands from the file if the date on the command line of the file
matches the current date. Any line beginning with a semi-colon (;) is
treated as a comment and is not processed. The format of a command file
line is 'YYYY-MM-DD Command'. The command can be any valid DOS command
including a BATch file. The date MUST be in the format shown above with
the exception that any of the digits may be replaced with a wild card
question mark (?). Commands are limited to 128 characters.
Miscellaneous REXX Routines (Updated 2001-03-04)
This archive is a collection of miscellaneous routines that can be used
with REXX. This collection includes routines for:
- Capitalizing the first character of each word in a string.
- Converting a string to all upper or lower case.
- Checking for the existence of a file.
- Returning the number of the day in the current year in the form of
a three digit string.
- A factorial calculator demonstrating the use of recursion.
- Returning the full name of a file based on wild cards.
- Display the key code for any key pressed.
- Return the long and short spellings of the months.
- A lightbar listbox, with an example of its use.
- Add entries to a log file.
- Clock setting routines for daylight savings time.
- Strip HTML codes from a text file.
- Test the system's random number function.
- Add commas to numeric strings for display purpose.
These routines have been developed using the standard REXX provided
with OS/2, but should be transferrable to any system using the standard
REXX language.
ReplaceP (v1.00 - 1995-02-11)
This is an OS/2 program to replace strings in TEXT files.
If either the search or replace strings contain spaces, they must be
enclosed in double quotes (ie. "test string"). If you wish to include
a double quote in one of the strings, simply enter it as \".
SetLevel (v1.00 - 1994-09-25)
This program is designed to read a number from the command line and
exit with an errorlevel equal to that number.
StripLine (v1.12 - 1993-10-17)
This program is designed to read an input text file and strip out all
lines beginning with one of a series of patterns given in a configuration
file. The configuration file is a simple text file with each match
pattern on a separate line. Any line in the configuration file that
begins with a caret (^) is considered to be a comment line and will not
be processed. The program creates a backup file called filename.BAK
prior to beginning the stripping operation. This file is left upon
completion of the program.
The text file to be stripped must be in the current directory. The
configuration may be specified with a full drive and path. If the
configuration file is not specified, it will default to STRPLINE.CFG
in the current directory. You are allowed a maximum of 256 search
patterns of 40 characters maximum.
TimeLog (v1.00 - 1996-05-27)
TIMELOG allows you to include time-stamped entries into a log file.
The program is typically used to log system boot times, and for tracking
program usage by including it in the batch file running the program.
|