home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 8
/
CDASC08.ISO
/
VRAC
/
HISTU.ZIP
/
HISTU.DOC
< prev
next >
Wrap
Text File
|
1993-07-14
|
4KB
|
106 lines
HISTU.BTM
Free 4DOS utility: command history duplicate entry deleter
Version 1.00 - July 14, 1993
(c) 1993
by
David Daniel Anderson
Reign Ware
HISTU, with the help of three free included external programs, removes all
superfluous lines from the current 4DOS command history list.
Usage: HISTU
HISTU takes no parameters.
External programs needed are:
1) LINEN5- text file enumerator and un-enumerator, used to attach and
remove 5-digit line numbers so PDSORT can do its thing;
2) PDSORT- A Public Domain External Sort Program, used to sort and unsort
the history list so FDUPLINS can do its thing;
3) FDUPLINS- text file duplicate line deleter, used to delete the superfluous
lines.
I include each of these in separate utility packages, which I have bundled
into one "large" collection. If any part is missing, I suggest the following:
1) look for the missing pieces at the same place you got this piece;
2) download the original collection (RWUTLS??.ZIP) from CHANNEL 1 (r) BBS,
at (617) 354-8873 (v.32bis 14.4: 617-354-5776);
3) contact me, and tell me what disk size you prefer (I prefer CHANNEL 1);
4) try to improvise with what you can obtain or create yourself.
{-----------------------------------------------------------------------------}
The 15 steps HISTU follows are:
(4DOS exclusive commands are indicated by a -, external programs by an *.)
1) -HISTORY >>#_HLIST#
Writes the command history list to a temporary file.
2) -SCRPUT %_ROW 1 BRI RED ON BLA *** HISTORY WAS %@FILESIZE[#_HLIST#] BYTES,
Reports on the current size of the history (I don't think that the
filesize is actually the history size, but an indication anyway).
3) ECHO.
Writes a blank line.
4) *LINEN5 #_HLIST# #_HSORT#
Adds 5-digit line numbers to the temporary history list file so it
can be sorted and unsorted.
5) *PDSORT #_HSORT# #_HLIST# 6:128 1:6
Sorts the history list.
6) DEL #_HSORT#
Deletes a temporary file.
7) *FDUPLINS #_HLIST# #_HSORT# /D5
Removes the duplicated lines, ignoring case differences, leaving only
non-duplicated lines. (No lines are lost, one of each is saved.)
8) *PDSORT #_HSORT# #_HLIST# 1:6
Resorts the history list.
9) DEL #_HSORT#
Deletes a temporary file.
10) *LINEN5 #_HLIST# #_HSORT# /R
Removes the previously added line numbers from a temporary file.
11) -HISTORY /F
Flushes the command history list.
12) -HISTORY /R #_HSORT#
Reads the command history list from a temporary file.
13) -SCRPUT %_ROW 1 BRI RED ON BLA *** HISTORY IS %@FILESIZE[#_HSORT#] BYTES.
Reports on the new size of the history.
14) ECHO.
Writes a blank line.
15) DEL #_HLIST# #_HSORT#
Deletes the temporary files. (Although not necessarily a 4DOS exclusive
command, not all command interpreters - notably old versions of MS-DOS's
COMMAND.COM, allow multiple files to be specified on the command line.)
4DOS (r) is a registered trademark of JP Software Inc. Other brand and product
names are trademarks of their respective owners.
NOTE: This may work, with modifications, with other command history programs.
I can not, and probably will not, test it. However, if you can and do,
I would appreciate hearing how it performs. I will distribute any
modified copies you send me (on disk or simply a printed source listing).