Musus Umbra's Command line Utilities
NB: These pages are still under construction!
Most of these utilities were written to fulfill a specific need at a specific time. I do, however, always try to make such things as general as reasonable, so it's quite possible that something here may interest you...
The best place for these is in your library directory, but feel free to put them wherever you wish.
See the foot of the page for an explanation of what the little symbols mean!
Note that all these utilities are supplied with full source code :-)
- Forall (17K)
A simple utility which will scan a directory (recursively, if desired) and then perform some action upon each file in that directory which matches the requirements given (filename/filetype).
The action is specified as a *command and can refer to the found file by full pathname, leafname and also to the parent directory of that file.
The main advantage of forall over other, similar, utilities is that it scans the directory tree first and only then starts issuing commands. This makes it possible to use *rename, *delete, et.al. which could otherwise cause problems.
As a bonus, forall can be instructed to output an Obey file of the commands (and/or execute them).
Since full source code is included it's simple to add even more nice features, should forall not actually meet your requirements :)
- WhichMod (2K)
A simple utility that attempts to work out what module (if any) a given address is in.
Intended to help either track problems down, or provide better info when reporting them when you get address exceptions, data aborts, etc.
- BDotD2 (20K) is a simple (but clever) 'backdrop of the day' chooser.
Given a directory (or list of directories), BDotD2 will choose a backdrop for you from all the spritefiles in them!
What's more, BDotD2 will automatically determine whether the sprite should be tiled, scaled or centered!
It'll even make sure that you get to see all your sprites before there's a repeat!
- du & df (15K) are two simple utilities that will be familiar to those of you who have Unix experience.
du counts the size of directories. There are many options for controlling the output format, block-size rounding, verbosity, etc.
df lists the free space on the discs in all your drives with just one command. Basically, this is just a curio to bundle with du.
- IfNewer (3K) is a simple utility that will compare two files, and if the first is newer than the second (or if the files have the same/no datestamp but different contents, etc) execute a specified command.
I find this one very useful for making 'automatic backup' scripts and the like.
- IfTask (3K) will execute a given command if (and only if) a specified application is already running on the machine.
I can't remember why I wrote it, but I must have had a reason...
New (18 Jan 1999) - finally uploaded the version that copes with non-null terminated task names... (sorry Mark)
- kill (4K) provides a simple method of quiting applications from script files.
I use kill to quit all my Angband utility programs at the same time, just by clicking on an obey file.
- Shutfile 1.02 (17 Dec 1998) [4K] lists all the open files on the machine. By specifying an argument you can close files by name and/or number!
Handy for when some badly behaved code dies and leaves files open.
What the little symbols mean..
denotes a utility written in C (or very occasionally BASIC). These utilities are suitable for use at the command line, from obey files, etc. but not from within programs.
denotes a transient utility written in assembler. Transient utilities may be used in exactly the same way as the C utilities, but may also be used within programs.
Any Comments, etc. to Musus Umbra
To my Home Page