home *** CD-ROM | disk | FTP | other *** search
- TABX - tab expansion utility
- ===============================
-
- The basic function of the TABX utility is to that expands TAB characters
- to SPACES. The program works as a filter, that means that it can handle
- files of arbitrary size, as big as your disk will allow.
- The input is taken form the 'standard input' and output is written
- to the 'standard output'. By default standard input is the keyboard
- and standard output is the screen.
- In order to work with files a redirection of input and output is
- necessary. The following line demonstrates how to use TABX when the
- input file is named 'input' and the output file is named 'output':
-
- TABX < INPUT > OUTPUT
-
- In addition to tab expansion TABX can do case conversion, eliminate
- excessive blank characters and add line numbers.
- These options are described below.
-
- Tab spacing can be set in two ways:
-
- 1. Fixed tab spacing:
- Tabs are expanded to spaces, up to a multiple of the spacing.
-
- TABX 3 < a:input >c:\txt\output
-
- Will set tab stops in columns 3,6,9 etc. there is
- no limit to line length.
- The default tab spacing is 8.
-
- 2. User defined tab spacing:
- Tab stops are set according to a tab specification string:
-
- TABX --T----T------T- < aaa > bbb
-
- This will set tab stops at columns 3,8,15.
- When the input line is longer the the tab specification string,
- tab stops of the excessive characters will be set to default
- fixed spacing.
- In the specification string, 't' can replace 'T' in setting tab stops,
- any other character can replace the '-' characters above.
-
-
- Each TAB character is expanded to at least one space character.
-
-
- Other options:
-
- TABX [-flags] [tab_specification] < infile > output
-
- The following flags may be specified:
-
- -e Excessive blank characters are removed from end of lines.
- -n Line numbers are inserted at the beginning of lines.
- -u Convert all character to upper case.
- -l Convert all character to lower.
- -c Capitalize words in the file.
- -s strip bit 8 from all characters.
-
- Options, fixed tab spacing and tab spec string may appear in any
- order on the command line.
-
- The following will add line numbers in addition to expanding tabs:
-
- TABX -l 5 < in > out
-
-
-
-
- Usage summery is available by running
-
- TABX ?
-
-
-
- More about options
-
- In addition to expanding tab characters TABX can perform several
- other operation on the text that is flowing through it.
- Each option may be viewed as a filter, with an input and output
- connections. Filters are connected by pipes in the same way a water
- (or sewerage) system is made (somewhat resembling unix).
-
- The data stream is entering the system from the standard input,
- then it is going through the filter that expand every tab to spaces.
- The result stream may flow through optional filters and, finally,
- it is going out to the standard output.
-
- The optional filters are connecter by specifying options in the
- command line. The order of the filters is important, and is determined
- by the order of the flags in the command line.
-
- For example:
-
- TABX -lc < in > out
-
- Will create the following piping:
-
- input expand convert make output
- file ===> tabs to ===> to lower ===> capital ===> file
- 'in' spaces case starts 'out'
-
- This will convert every letter to lower case, and then
- capitalize start of sentences only.
-
- On the other hand,
-
- TABX -cl < in > out
-
- Would result in capitalization first and converting all characters
- to lower case later. The result will be a file with lower case letters
- only.
-
-
-
- COPYRIGHT & DISTRIBUTION
-
- Copyright - Baruch Nissenbaum, Israel, 1990.
-
- This program and its source code may be copied by anybody,
- for any purpose, as long as the following two terms will be kept:
-
- 1. The program will be distributed FREE OF ANY CHARGE whatsoever.
- In particular, it is forbidden to include the program in any package
- that costs money.
- 2. This message will be distributed/copied along with the program.
-
-
- Comments, suggestions and ideas are welcomed, at:
- baruch@taunivm.bitnet (taunivm.tau.ac.il) or baruch@taueng.tau.ac.il
-
- baruch.