Mail Archives: opendos/1997/09/30/19:06:08
> I have put choice, tail and version in
> ftp://ftp.bird.org/pub/opendos
I have written some utilities (some of which are "drop in" replacements
for OpenDOS external commands). The first ones that are available are:
CHOICE - can be used in batch files to select actions at run-time;
a replacement for the OpenDOS/MSDOS command of the same name;
my version also allows the selection to go to an environment
variable or a file, or used to change directories. It also
has some *very* powerful full-screen menuing facilities...
try the included MENU.BAT program to see what can be done.
TAIL - outputs just the last few lines or bytes of a file. With the
/F option it can wait for data to be added to a file; this
works well with mutitasking or network filesystems where
(for example) a log file is written to in such a way that
it is closed and re-openned when more is added, but it can
work in other situations as well (I have had mixed success,
mainly due to sharing conflicts and limitations in what DOS
understands about updates in a multitasking situation... I
would like feedback on successes/failures here!)
VERSION - similar to the command that comes with the PNW part of
Novell DOS and OpenDOS, but my version uses different
checksum methods (advantages and disadvantages), and can
recognise a wider range of version and copyright signatures
in programs and text files.
(programs soon to be released: UPTIME, XDIR, XCOPY, FDISK, MORE, HELP,
RENDIR, TOUCH, XDEL, ATTRIB, SPACE, UNCOPY, MOVE, FORMAT, TREE)
They have the following features:
* Free! (See the .DOC file in the zip archives for the conditions of
use and redistribution - basically it is as free and open as I can
make it.) If anybody wants the complete sources contact me; I don't
include normally everything because it makes the archives
unneccessarrily big (:-).
* Uses OpenDOS features where appropriate, but can be used with any
DOS. I test them with the latest OpenDOS and Win95 and sometimes
OS/2 and older DOSes... I welcome any bug reports, and these first
releases have to be considered "beta", but I think they should run
under any DRDOS, OpenDOS, MSDOS, PCDOS and FreeDOS. (There are a
few exceptions: the uptime program that will be released later will
not work properly under early DRDOS versions; the TAIL command with
devices other than CON will not work properly under Win95 due to a
bug in Win95).
* They all use a common set of environment variables and (as far as
possible) command options...
SET _ANSI=Y to use ANSI colours, cursor positioning, etc.
SET CLASS1 or CLASS2 to Ignore, Warn, Error, Abort, or Reboot!
to control how the program reacts to "normally fatal" and
"non-fatal" errors; for example if you use /L=file to list
to a given file but it cannot be written this is normally
a fatal error, whereas trying to tail all *.BAT files when
non exist is only a class 2 error which would normally give
a warning "no files match *.BAT".
SET LFN=N overrides the automatic detection of long filename
support and uses short names only
SET COMPATIBILITY=NWDOS (or MSDOS, Win95, etc) forces various
formatting options (and other choices) to conform to the
given standard.
SET NOCHAR=text (normally "N" or "No" or "False" or "0" plus a few
non-English words will be taken as "no" when a Yes/No question
is encountered) this lets you set you own letter/word.
SET YESCHAR=text (ditto but for "Yes")
SET SWITCHAR=text Normally the OpenDOS system call for reporting
the character that signals a command line "switch" option is
used - this overrides that (e.g. in some versions of DOS that
don't support the system call). By default it is "/" but even
then "-" will be also accepted when it isn't ambiguous.
SET CMDLINE=text In case you have a command line longer than 127
characters.
SET (name of command)=/options allows you to set default switches
for the command, e.g. SET VERSION=/Verbose/A will assume these
options every time you use the version command.
The commands take notice of the country options for default date
format, etc (but will accept month names whether the day or the month
is first.
* The VERSION command (mine or Novell's) will report the version numbers
in these programs (because I haven't PKLITE'd them; okay that makes them
a bit bigger than OpenDOS commands of the same name, but a few dozen Kb
isn't too much of a problem, is it?)
* The built-in help screen (using /?) is reasonably clear (but use the
.doc file for more information - I always like to keep the built-in
help down to one screen. The format varies in subtle ways if you have
ANSI loaded or are redirecting the output, as a diagnostic.
* As far as possible, the commands are dewsigned to be "BBS-friendly"
and Desqview-aware (as well and TaskMax/Mgr-aware and Windoze-aware).
The "choice" program in the full-screen menu mode, for example, when
function keys are accepted can recognise function keys from VT100,
ADM, TVI, QVT, Data General and Wyse terminals as well as PC's in
normal mode or running most terminal emulation software.
* The "standard error" is used for warning/error messages so redirected
output still results in a message on the console. Output to the
printer (with the /L option of TAIL, etc) goes to the "standard printer"
file handle (but you can specify a different printer using /LPT2 or
/L:somefile).
* Commands aren't case-sensitive. I use capital letters in documentation
to highlight keywords (or the *required* part of options, e.g. you can
use /V or /v or /Verbose or /verbosity as an option).
-------------------------------------------------------------------------------
Mark Aitchison, Physics & Astronomy \_ Phone : +64 3 3642-947 a.h. 3371-225
University of Canterbury, </ Fax : +64 3 3642-469 or 3642-999
Christchurch, New Zealand. /) E-mail: phys169 AT csc DOT canterbury DOT ac DOT nz
#include <disclaimer.std> (/' Callsign: ZL3TQE
-------------------------------------------------------------------------------
- Raw text -