REWORD
Reword a File to Have Fixed Number of "Words" Per Line


REWORD is an executable C++ program that reads a text file and makes a copy in which every line has the same number of "words" - that is, strings separated by blanks.

The user specifies the number of words per line.

Related Data and Programs:

CR2LF is an executable C++ program which reads a text file and replaces carriage returns by line feeds.

CRRM is an executable C++ program which reads a text file and writes a copy which has no carriage returns.

DEBLANK is an executable C++ program which makes a copy of a text file in which blank lines have been removed.

DECOMMENT is an executable C++ program which makes a copy of a text file which contains no "comment" lines (that begin with "#").

FILUM is a library of C++ routines for performing various operations on files.

REFORMAT is an executable FORTRAN90 program which reads a text file that contains only real values, and writes a copy which has a fixed number of real values on each line.

UNCONTROL is an executable C++ program which makes a copy of a text file which contains no control characters.

WRAP is an executable C++ program which makes a copy of a text file in which no line is longer than a user-specified wrap length.

WRAP2 is a C++ program which wraps long lines in a text file, but which wraps some lines "early", so as to avoid breaking words.

Usage:

reword file1 file2 word_length
reads the lines of file1, writing copies of the lines to file2, breaking the lines up as necessary so that each line contains word_length words.

Source Code:

Examples and Tests:

List of Routines:

You can go up one level to the C++ source codes.


Last revised on 02 December 2006.