CRRM
Remove Carriage Returns


CRRM is an executable C++ program that removes carriage returns from a file.

I constantly run into problems, when transferring a file from one system to another, involving different conventions for ending a line of text.

It is my understanding that the following "conventions" apply:

While your file transfer program will usually transfer a text file in such a way that that carriage control is properly translated, this sometimes doesn't happen, especially if the text file is transferred "verbatim", that is, as though it were a binary file.

In such a case, CRRM is the correct program to use if you want to convert a PC text file to a UNIX text file, since it will replace each occurrence of CR+LF by LF.

Related Data and Programs:

CR2CRLF is an executable C++ program which replaces carriage returns by carriage returns + line feeds.

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

DEBLANK is an executable C++ program which makes a copy of a text file which contains no blank lines.

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.

LF2CR is an executable C++ program which replaces linefeeds by carriage returns.

LF2CRLF is an executable C++ program which replaces linefeeds by carriage returns + line feeds.

LFRM is an executable C++ program which removes all linefeeds from a file.

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.

REWORD is an executable C++ program which reads a text file and writes a copy which has a fixed number of "words" per 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:

crrm file1 file2
The program will read file1 and create file2
crrm file1
The user will be prompted for the output file.
crrm
The user will be prompted for both files.

Source Code:

Examples and Tests:

List of Routines:

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


Last revised on 12 December 2005.