T ext T ools R elease 5 of 22-Sep-97 Copyright © 1996-97 by Rune Berg. All Rights Reserved.
Overview | Installation | Terms Tools Summary | Changes Important Notes | Feedback
tcols | tsort | trows | tuniq | tand | tjoin first | last | lines | middle eol | xtabs | itabs | tfinfo | dump lsx | sum | acho | closure | create | numl
General Features | Support Utilities

### OVERVIEW

TextTools is a collection of ASCII text filters and other goodies. Many of the programs process text-format tables, and offer powerful and unique functionality.

All TextTools programs run from the command line ("DOS prompt"), or from batch files.

TextTools comes with two sets of executables:

- DOS (real-mode, conventional memory): these run on plain DOS, the Windows 3.1x DOS prompt, the Windows 95 DOS prompt, and Windows the NT DOS prompt.
- Win32 console mode: these run on the Windows 95 DOS prompt and the Windows NT DOS prompt.

The two sets have equivalent functionality, but the Win32 executables offer higher capacity where relevant.

### INSTALLATION

TextTools R5 is distributed as a file `tt_r5.zip`, containing:

          readme.txt
          doc_html/*.htm   documentation for the TextTools programs
          exe_dos/*.exe    the DOS executables
          exe_w32/*.exe    the Win32 console mode executables

To install the programs, extract (using pkzip 2.04g or equivalent) either set of executables (`exe_dos/*.exe` or `exe_w32/*.exe`) to a directory in your PATH. Or: create a new directory, extract the executables to that directory, and add that directory to your PATH.

All documentation is in the form of HTML files. To install the documentation, extract all the HTML files (`doc_html/*.htm`) to a directory on your harddisk. (Make sure you extract them to the same directory, or else the hyperlinks won't work.) To view the documentation, load the file `tt_r5.htm` into your browser (Netscape Navigator 2.0 or better, or Internet Explorer 2.0 or better.)

### TERMS

All TextTools programs and documentation are Copyright © 1996-97 by Rune Berg. All Rights Reserved.

TextTools Release 5 is Freeware. It may be freely distributed and used for non-commercial purposes only. It may be included on Shareware/Freeware CD-ROM collections, though. It must not be modified in any way, and must be distributed in its entirety.

Please note that future TextTools releases may well be Shareware. (This will not affect older releases' status as Freeware.)

Disclaimer: Rune Berg disclaims all warranties as to this software and its documentation, whether express or implied, including without limitation any implied warranties of merchantability, fitness for a particular purpose, functionality or data integrity or protection.

### TOOLS SUMMARY

Programs for processing tables:

tcols | project and transform table columns
trows | select table rows that fulfill given conditions
tsort | sort table on result of projection/transform
tuniq | print rows that evaluate uniquely on tcols-style expressions
tand | print rows present in two tables
tjoin | database-style join of two tables

Programs for copying part of files:

first | copy first n lines of file
last | copy last n lines of file
lines | copy specifically numbered lines of file
middle | copy middle part of file

Other text filters:

eol | convert between DOS and UNIX end-of-line styles
xtabs | expand tabs to spaces
itabs | insert tabs in place of spaces

Miscellaneous:

lsx | list directory contents grouped on file basename
sum | sum up integers in file
acho | echo with ANSI codes for colour etc.
closure | compute closure of graph of text nodes
create | create empty files
dump | dump file contents in hex/decimal/octal
numl | number lines in text file
tfinfo | print text file content statistics *** NEW ***

### CHANGES

General:

- All programs now have return codes indicating success (0), warning (1..99), or reason for failure (100..); see each program's documentation.
- All documentation has been overhauled to better take advantage of HTML tables.
  Besides, several minor errors have been corrected, and vague descriptions clarified.

Program-specific:

Program | Current version | Changes since Release 4
--- | --- | ---
acho | 1.20 | Bug-fix: Win32 version didn't show colours on NT. Win32 version no longer emits ANSI codes; achieves colouring by other means. Win32 version has several new .xxx directives.
closure | 1.30 | Bug-fix: no longer prints empty line when key does not appear in graphfile.
create | 1.30 | (general)
dump | 1.30 | (general)
eol | 1.20 | (general)
first | 1.20 | (general)
itabs | 1.20 | Bug-fix: did not print report on Win32 when taking interactive input. New option -l : Only implode leading spaces. New option -nr : Don't print report after processing.
last | 1.20 | (general)
lines | 1.20 | (general)
lsx | 1.40 | Bug-fix: did not handle dir-names such as \ and c: Bug-fix: Win32 version didn't show colours on NT. Win32 version no longer emits ANSI codes; achieves colouring by other means.
numl | 1.10 | (general)
middle | 1.20 | (general)
sum | 1.20 | (general)
tand | 1.30 | (general)
tjoin | 1.30 | (general)
tcols | 1.50 | Bug-fix: -r option didn't work properly on Win32 when taking interactive input.
tfinfo | 1.00 | New program
trows | 1.50 | Bug-fix: -r option didn't work properly on Win32 when taking interactive input. New option -sN: Stop after outputting after N lines.
tsort | 1.50 | (general)
tuniq | 1.50 | (general)
xtabs | 1.20 | Bug-fix: did not print report on Win32 when taking interactive input. New option -nr: Don't print report after processing.

### IMPORTANT NOTES

The DOS executables run in real-mode, and don't use expanded or extended memory. Thus, some of the programs have limited capacity. If you're running Windows 95 or NT, use the Win32 console mode executables for greater capacity.

Due to (what I believe is) an NT pipe bug, I've made the Win32 console mode executables treat broken pipes as normal end-of-file situations when running on NT (only). This does not affect the DOS versions, or the Win32 console mode executables when running on Windows 95.

All included executables are debug builds, i.e. they're compiled with asserts etc., to help in catching bugs. This means they run a little slower than they really could.

### FEEDBACK

Ok, hope you find these programs useful. Any feedback is much appreciated.

E-mail to:

runeberg@online.no

Snail-mail to:

Rune Berg
Steinspranget 44
1156 Oslo
Norway

Cheers,
- Rune

##### End of document