deblank


deblank, a C++ code which makes a copy of a text file in which all blank lines have been removed.

A blank line contains no characters, or else nothing but blank characters.

If the final line of the input file isn't blank, but does not terminate with a NEWLINE character, the corresponding line in the output file will have a terminating NEWLINE appended to it. A previous version of this program would instead inadvertently omit this final line from the output file.

Usage:

deblank old new
where

Licensing:

The information on this web page is distributed under the MIT license.

Languages:

deblank is available in a C++ version.

Related Data and Programs:

CR2LF, a C++ code which reads a text file and replaces carriage returns by line feeds.

CRRM, a C++ code which reads a text file and writes a copy which has no carriage returns.

DECOMMENT, a C++ code which makes a copy of a text file which contains no "comment" lines (that begin with "#").

DETROFF, a C++ code which removes from a file every occurrence of the TROFF overprint pair character+backspace, which can make a MAN page printable;

FILUM, a C++ code which performs various operations on files.

REFORMAT, a FORTRAN90 code 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.

REWORD, a C++ code which reads a text file and writes a copy which has a fixed number of "words" per line.

UNCONTROL, a C++ code which makes a copy of a text file which contains no control characters.

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

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

Source Code:


Last revised on 23 April 2024