SUD - Small Utilities for Dos

 

[SUD] SUD is a collection of Dos programs that I've created for my personal use (SUD stands for Small Utilities for Dos). This collection includes programs to: search for a hexadecimal sequence; replace sequences of bytes with other sequences; extend or truncate files; merge sorted files; change video mode and blink status; show the pathname of a command in the path; set environment variables according to mouse position.

 

Type Version Description Requirements Features Download

 

Type

Utilities for Dos/Windows; freeware/GNU General Public License 2.0.

 

Version

1.0 / english.

 

Description

This collection of programs include a few utilities that I've created for my personal use in the last year; they can be used to:

BLANKIT invoke a screen blanker; the user must press a button on the mouse or a key on the keyboard to exit (mouse movements are ignored)
BLINK toggle between blink mode/hi-intensity mode
FHEX locate hexadecimal sequences in a file, with wildcards
MERGE merge two sorted files
MOUSE set environment according to mouse position
PAD extend or truncate files
TRANS replace sequences of bytes with other sequences
VMODE change text video mode interactively (25/43/50 lines)
WHICH print pathname of a command in the path

 

Requirements

 

Features

All the programs, except MOUSE, print out a short usage summary if run without parameters.

BLANKIT - Screen Blanker

Command line:

BLANKIT [/B] [/M] [/Q]

Description:

this program blank screen until the user presses any key on the mouse or on the keyboard; in the meanwhile, colorful serpents run all over the screen. This is a text-only screen saver; it's not a TSR, it is useful when you leave your machine turned on and want to save your monitor's life. Unlike other screen savers, which exit when you move your mouse a little, BLANKIT ask the user to press a key to return.

Parameters:

/B black screen instead of bi-color serpents
/M slow mouse reset
/Q start immediately, no request

 

BLINK

Command line:

BLINK [+ | -]

Description:

BLINK + activate text blinking
BLINK - activate background intensity

This small program is useful since many programs change blink state and don't restore previous state when returning; BLINK can be used, then, to adjust things.

 

FHEX - Find Hex

Command line:

FHEX [/Rx] file hex_sequence

Description:

this utility finds all the occurrences of a hex sequence in a file. Each character in hex_sequence consists of two hexadecimal digits; '??' stands for any character and '**' for any group of characters (up to 5, or the number specified with /R). To specify a literal character 'c' in hex_sequence, use '=c'.
An invalid hex character is substituted with '??' before starting the search. For each match, the sequence and its absolute offset are reported.

 

MERGE - MergeSortedFile

Command line:

MERGE main_file update_file destination [start] [end]

Description:

MERGE replace lines in 'main_file' with corresponding lines in 'update_file' and add the new lines found; the result is stored to 'destination'.
Lines are compared only from column 'start' to column 'end', if specified.

Important: the files 'main_file' and 'update_file' must be already sorted on the same field; reading is stopped when the character CTRL-Z is read or end-of-file is reached.

MERGE works only on Dos/Windows text files.

 

MOUSE

Command line:

MOUSE [x]

Description:

this utility wait for the user to press a mouse button and return setting environment variables:

YR to screen row (starting from 0)
XC to screen columnn (starting from 0)

If variables are not present in environment, they are added. If any parameter is passed to the program, a clock is displayed in the top right corner of the screen during selection and is removed before exiting.

 

PAD - FilePadder

Command line:

PAD filename [size | +num | -num] [padchar]

Description:

truncate or extend specified files; bytes appended are set to padchar (default = 0), which must be an integer between 0 and 255. 'filename' can include multiple wildcards '*' and '?'.

Program behaviour is as follow:

All modifications are done 'in place', i.e. specified files are overwritten.

 

TRANS - FileTransformer

Command line:

TRANS source seq2find seq2repl [/R] [/Ddest] [/K] [/Sn] [/X] [/Q]

Description:

this program replace each occurrence of seq2find in source with seq2repl. Sequences can include C-like constants; the following escape sequences are supported:

\a \b \f \n \r \t \v \\ \? \' \"

and octal, hexadecimal and decimal constants thus specified:

'source' can include multiple wildcards '*' and '?'; destination files will have the same name as source files with extension ".NEW" (if /K is not specified).

TRANS can be used, for example, to convert between different text file formats:

e.g. converting Dos <-> Unix

Parameters:

/R ignore seq2repl (which must be specified, anyway) and forces removal of every occurrence of seq2find;
/D specify destination directory for newly created files (default: source directory);
/K keep original names (to be used together /D);
/Sn skip n-th substitution;
/X replace only sequences specified with /Sn;
/Q quiet operation.

 

VMODE - Set Text Video Mode

Command line:

VMODE

Description:

this program let you change interactively the current text video mode; supported video modes are:

 

WHICH

Command line:

WHICH filename[.com | .exe | .bat]

Description:

this utility print the pathname of a command in the path; it can be useful when you have multiple instances of a program with the same filename, and you want to see which copy would be executed according to path order.

 

Download

Download SUD (version 1.0 for Dos/Windows)

 

Top of page